fork(1) download
  1. class Main{
  2. public static void main (String[] args){
  3. java.util.Scanner in = new java.util.Scanner(System.in);
  4. long n = in.nextInt(), m = 5, s = 0;
  5. while(n >= m){
  6. s = s + (n / m);
  7. m = m * 5;
  8. }
  9. System.out.println(s);
  10. }
  11. }
Success #stdin #stdout 0.1s 35108KB
stdin
7
stdout
1