A strictly positive integer is polite if it can be written as the sum of two or more consecutive strictly positive integers. 7 is an example of a polite number as it can be written as 3+4. Polite numbers are sometimes also called staircase numbers because the Young diagrams, graphically representing the partitions of a polite number into consecutive integers, resemble staircases.
Some numbers can be written as a sum of consecutive numbers in multiple ways. 15, for example, can be written in three different ways:
1 + 2 + 3 + 4 + 5 4 + 5 + 6 7 + 8
The amount of ways in which a number can be written as a sum of two or more strictly positive integers, is called the politeness of a number. Numbers that are a power of two can't be written as a sum of two or more consecutive numbers. Those numbers have a politeness of 0, therefore they are impolite.
A number $$n \in \mathbb{N}_0$$.
A number that represents the politeness of the number $$n$$.
Input:
15
Output:
3