1787Lot

1787   Lot

题目描述

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 this way.

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.

输入样例 复制
10
4
输出样例 复制
2
0

说明

2
2
通过提交
时空限制2000ms/64mb
题目来源
评测方式在线评测
题目类型
难        度