import java.util.*;
import java.io.*;

public class iProfits{
	public static void main (String[] args){
		File infile = new File("data1.txt");
		File outfile = new File("out1.txt");
		Scanner read;
		int[] copies = new int[5];
		PrintStream ps;
		try{
			read = new Scanner(infile);
			ps = new PrintStream(new FileOutputStream(outfile));
			for (int i=0; i<5; i++){
				copies[i]=(int)Math.ceil((int)(read.nextInt()/ (0.7*0.99))/1000.0)*1000;
				ps.print(copies[i]);
				ps.println();
			}
		} catch (Exception e){
			System.err.print("This operation could not be completed.");
		}
	}
}
