I'm puzzled by the behaviour of distance words such as inch, foot and mile. Their use of plurals seems odd. For example, one would say "a three-inch nail" but it's "three inches long"; a twelve-foot wall is twelve feet high; a four mile run covers four miles. What is the rule here?