Competitions
АСМ for students of Georgian Technical University
Strange number
Once afinancierponderedthe following question- is it possiblewithnegativetotalsfor each intervalof onemonthandthe same lengthof someof the reporting period, however, thesum totalof the sameperiodapositiveindicator.
Our task- to helphim in this.Required towrite a program thatfora given positiveinteger Ndeterminesthe total numberof numbers thathavethe aboveproperty for aperiodof lengthN.Iefor given Ntofind the numberofintegers nfor each of them, you cancreatea sequenceof length N,the sumof whose membersis positive,buteachsegment of lengthn inthe sum givesa negative number.
Input
The onlyline of input containsintegerN (1 ≤ N ≤ 2·1010).
Output
The output filea single number- the answerof the problem.
Input example #1
2
Output example #1
0