HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Algorithms and Data Structures > problem:


05. Trailing Zeros

Volume problems

• 01. Автобус в Джал
• 02. Футбол
• 03. Новый язык программирования
• 04. Баскетбольная команда
• 05. Trailing Zeros
• 06. Премьер-министр
• 07. B. Влюбленная Duff
• 08. B. Песня о любви
• 09. Weird Algorithm
• 10. А. Любовь «А»
• 11. Missing Number
• 12. D. Love-Hate
• 13. Repetitions

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Difficulty Beta

Your task is to calculate the number of trailing zeros in the factorial n!.
For example, 20!=2432902008176640000 and it has 4 trailing zeros.
Input
The only input line has an integer n.
Output
Print the number of trailing zeros in n!.
Constraints
1≤n≤10^9

Example
Input:
20
Output:
4

Для отправки решений необходимо выполнить вход.

www.contester.ru