Time Limit: 2 Seconds
Memory Limit: 65536 KB
Out of N soldiers, standing in one line, it is required to choose several to
send them scouting.
In order to do that, the following operation is performed several times: if
the line consists of more than three soldiers, then all soldiers, standing on
even positions, or all soldiers, standing on odd positions, are taken away.
The above is done until three or less soldiers are left in the line. They are
sent scouting. Find, how many different groups of three scouts may be created
Note: Groups with less than three number of soldiers are not taken into consideration.
0 < N <= 10 000 000
The input file contains the number N.
Process to the end of file.
The output file must contain the solution - the amount of variants.