import java.io.*;
import java.util.*;

public class TestsGen {

	static int done = 0;
	
	static final Random rand = new Random(556668949239L);

	static void print(int n) throws IOException {
		done++;
		System.err.println(done);
		PrintWriter out;
		if (done < 10)
			out = new PrintWriter("0" + String.valueOf(done));
		else
			out = new PrintWriter("" + String.valueOf(done));
		out.println(n);
		out.close();
	}

    static void randTest(int n) throws IOException
    {
        print(n * 2 / 3 + rand.nextInt(n / 3));
    }
	


	public static void main(String[] args) throws IOException {
		done = 2;
		// n <= 20
		print(4);
        print(12);
        print(16);
        print(17);
        print(20);

		// n <= 50
        for (int i = 25; i <= 50; i += 5)
            randTest(i);
		
		// n <= 1000
        for (int i = 200; i <= 1000; i += 100)
            randTest(i);

        //n <= 10000
        for (int i = 4000; i <= 10000; i += 1000)
            randTest(i);


        //n <= 100000
        for (int i = 20000; i <= 100000; i += 10000)
            randTest(i);

		return;
	}
}
