ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests

USU Junior Championship March'2004

About     Problems     Submit solution     Judge status     Standings
Contest is over

F. Crazy Notions

Time limit: 0.5 second
Memory limit: 64 MB
For five days robot-loader JK546L54p has been buried under the thick layer of the Sibelian plutonium slag. The terrible strike of the atmospheric electricity has led to the depressurization of the robot’s fuel elements. Who will examine this heap of fused, broken metal here, where there is no any robot technician even at distance of a hundred parsecs? Robot-commissar even did not try to investigate what happened with JK546L54p. He ordered to throw him out into dumps and that is all. Nobody noticed that positron brains of JK546L54p were still working. If only the robopsychologist was here with JK546L54p! Of course, he would be killed with the hard gamma radiation in a moment, but… If he attached the visualizer of thoughts to the fused connectors of JK546L54p! He would see the strange performance. Robot was creating! No, I am not joking. He was investigating. Semi casual objects arose in his mind, and he examined them. Crazy properties, crazy theorems.
Besides, here is an example. Let’s take an expression 1n+2n+3n+4n. How much zeros does its decimal notation end with? JK546L54p solved this problem, and you, student, could you?


The only line contains an integer n (1 ≤ n ≤ 300000).


Output the number of zeroes the decimal notation of 1n+2n+3n+4n ends with.


Problem Author: Den Raskovalov
Problem Source: IX Open Collegiate Programming Contest of the High School Pupils (13.03.2004)
To submit the solution for this problem go to the Problem set: 1295. Crazy Notions