Under construction

Still being built. Things may change

Floppies

Time limit1sMemory limit128 MB

Summary
Compute the number of floppies by applying fixed roundings for compression, uuencoding, 30000-line splitting, and recompression.
Level

Easy3 of 10

Topics
Math, Simulation, Implementation
Solved
No attempts yet

Problem

Even in the age of the Internet, instant email, and always-on connections, some people still work with floppy disks. John is one of them. Every evening he goes home and continues, on his personal UNIX system, the work he was doing at the office. He copies all the files he needs onto floppy disks with the following procedure:

  1. Put all files into one big SHAR file.
  2. Compress the file.
  3. uuencode the compressed file, so that it is split into neat lines of 62 characters each (the newline included).
  4. Split the result into pieces of 30,000 lines each (about 1.86 MB).
  5. Compress each piece and store it on its own floppy.

This has always worked, because 1.86 MB of uuencoded text, once compressed, fits comfortably on a 1.44 MB floppy disk.

Compression halves the size of the SHAR file, and uuencoding a compressed file increases its size by 50% (each result rounded to the nearest whole number of bytes). Given the size of the SHAR file, determine how many floppies John needs.

Input

The input contains several test cases. Each test case is a single line with one integer ss (0≤s≤1090 \le s \le 10^9), the size of the SHAR file in bytes.

The input ends with a line containing s=0s = 0; do not process that line.

Output

For each test case, print the case number (File #1, File #2, and so on) on its own line, then on the next line print the minimum number of floppies in the exact form John needs N floppies., where N is that minimum. Separate consecutive test cases with a single blank line.

Examples1

  1. Example 1

    Input
    1000000
    10000000
    100000000
    0
    
    Expected output
    File #1
    John needs 1 floppies.
    
    File #2
    John needs 5 floppies.
    
    File #3
    John needs 41 floppies.