Number of Locks

No attempts yetTime limit1sMemory limit128 MB

Problem

A factory makes spring locks. Each lock has nn slots (1<n<171 < n < 17, nn is a natural number), and the height of every slot is one of 1, 2, 3, 4. Ignore units.

A lock ships only when it meets both conditions below.

  • At least one pair of neighboring slots has a height difference of exactly 3.
  • The slots use at least 3 different height values.

Over every way to assign the 4 height values to the nn slots, find how many locks meet both conditions.

Input

Each line holds one value nn, the number of slots. The last line holds -1, which marks the end of the input.

Output

For each input value, print the number of locks on its own line. Begin the line with the input value nn, then a colon and a space, then the counted number of locks, so every line has the form n: count.