import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str = null; while((str = in.readLine()) != null){ String[] s = str.split(" "); int n = Integer.parseInt(s[0]); int sum = 0; for(int i = 1;i<=n;i++){ int temp = i; while(temp % 5 == 0){ sum ++; temp /= 5; if(temp == 0) break; } } System.out.println(sum);

    }
}

}