DWITE Online Computer Programming Contest
October 2009
Problem 1
iProfits

Having decided to capitalize on your awesome programming skills, you've set out to create and sell a mobile application at $0.99 per copy. Since the application is hosted and distributed through a managed platform, the store gets to keep 30% from each sale.

Given that you have an idea of how much profit you want to make off your hard work, at least how many thousands of copies must be sold? (That is, the answer is rounded to the next 1000).

The input file DATA1.txt will contain 5 lines, integers 0 <= N <= 1,000,000; the minimum profit you want to keep.

The output file OUT1.txt will contain 5 lines, integer value of number of copies needed to be sold, rounded to the next 1000.

For example: if you want to make $1000, then (1444 copies * $0.99) - 30% = $1000.692. (1443 copies will earn below $1000). 1444 rounded to the next 1000 is 2000; thus the answer is 2000.

Sample Input:
0
1
693
694
250000
		        
Sample Output:
0
1000
1000
2000
361000