Under construction

Still being built. Things may change

Sifar

Interview

Time limit1sMemory limit128 MB

Summary
For each N up to 1,000,000 given one per line until 0, print the count of trailing zeros of N! as Case #x: M.
Level

Easy3 of 10

Topics
Number theory, Math
Solved
No attempts yet

Problem

Given NN, print the largest MM such that N!N! is divisible by 10M10^M.

Input

The input has several lines. Each line holds one integer NN with 5≤N≤1065 \le N \le 10^6. The last line holds 00, and that line is not a test case.

Output

For each test case, print the largest MM on its own line in the form Case #x: M. Here xx is the test case number and it starts at 1.

Hint

Sifar is said to mean zero in Malay.

Examples1

  1. Example 1

    Input
    5
    10
    118
    0
    
    Expected output
    Case #1: 1
    Case #2: 2
    Case #3: 27