AT_jag2018summer_day2_c Equiangular
Description
[problemUrl]: https://atcoder.jp/contests/jag2018summer-day2/tasks/jag2018summer_day2_c
You have a regular $ N $-sided convex polygon. You are going to choose $ 3 $ or more vertices from the polygon, and make a new convex polygon $ P $ formed by chosen vertices. You very much like equiangular polygons (polygons whose vertex angles are all equal), so the polygon $ P $ must be equiangular.
Count the number of equiangular polygons that you can get in the above-mentioned way. Here, two polygons are considered to be the same if they are congruent, that is, one has the same shape and size as the other or as the mirror image of the other.
Input Format
Input is given from Standard Input in the following format:
> $ N $
Output Format
Print the number of equiangular polygons that you can get.
Explanation/Hint
### Constraints
- $ 3\ \leq\ N\ \leq\ 10^{12} $
### Sample Explanation 1
You can get following $ 3 $ polygons. !\[\](https://img.atcoder.jp/jag2018summer-day2/3102e164a95bee35f368df05a15150d7.png)
### Sample Explanation 2
You can get following $ 4 $ polygons. !\[\](https://img.atcoder.jp/jag2018summer-day2/c96c48817292e2123505a051e4d9296b.png)