Skip to content

UKSPC Practice Problems » Floppies

In this age of the Internet, online connections, instantaneous email, et cetera, there are still some unhappy few who need to work with floppy disks, and John is one of them. Every evening, he goes home and wants to continue what he was doing at work on his private UNIX system. Thus, every night he considers the files he needs, and then puts them on one or more floppy disks.

For this, he has developed the following procedure:

  1. Put all the files into one big SHAR file.
  2. Compress the SHAR file.
  3. Uuencode the file such that it is split into nice lines of 62 characters each (including the newline).
  4. Split the one file into files of 30,000 lines each (so that each is about 1.86 Mb).
  5. Compress each of the files and put it on a floppy by itself.

This procedure so far always worked, since 1.86 of uuencoded text, after compression, will nicely fit on a 1.44 Mb floppy disk.

Now, given that, through compression, the size of the SHAR file halves and that uuencoding a compressed file adds 50% to its size (each rounded to the nearest integer number of bytes), we would like to know, for a given size of the SHAR file, how many floppies John needs.

Input Specification

The first line of input contains an integer N, which specifies the number of test cases. Each test case consists of a single line containing one integer S (0 ≤ S ≤ 1,000,000,000), being the size of the SHAR file in bytes.

Output Specification

For each test case write the following sentence: 'For B bytes of SHAR file, F floppies are needed.', where B is the size of the SHAR file in bytes, and F is the minimum number of floppies needed for the transfer.

Sample Input


Sample Output

For 1000000 bytes of SHAR file, 1 floppies are needed.
For 10000000 bytes of SHAR file, 5 floppies are needed.
For 100000000 bytes of SHAR file, 41 floppies are needed.