import java.util.Scanner;
import java.io.BufferedReader;
import java.io.*;
import java.util.StringTokenizer;

public class One_Based_Arithmetic {

        static MyScanner sc;
        static MyWriter pw;
        static String filePathWin="d:\\lmo.in";
        static String filePathLinux="/media/luismo/Trabajo/lmo.in";
        public static void main(String[] args) throws IOException {
            sc = new MyScanner(System.in);

            // sc = new MyScanner(new FileReader(filePathWin));
            // sc = new MyScanner(new FileReader(filePathLinux));

            pw = new MyWriter(System.out);

            while(sc.canRead())
                SolveSingleProblem();

            pw.close();
        }

        public static void SolveSingleProblem() throws IOException{

            long n = sc.nextLong();

            long dig = (long)Math.log10(n) + 1;

            long mirr = n;

            String s = "";
            for(int i =0; i < dig + 1; i++)
                s+="1";

            long k = Long.parseLong(s);

            long answ1 = best(n, k);

            pw.println(answ1);
        }

        static long best(long n, long k){

            if(k == 1) return n;

            int cumul = 0;
            int digits = (int)Math.log10(k) + 1;

            if(n == k){
                return digits;
            }

            if(k < n){
                return digits + best(n - k , k);
            }

            long left = digits + best( k - n, k / 10);

            long right = best(n, k / 10);

            return min(left, right);
        }

        static long min(long a, long b){
            return (a < b)? a: b;
        }

    }

    class MyScanner{
        BufferedReader br;
        StringTokenizer stk;
        public MyScanner(InputStream stream){
            this.br = new BufferedReader(new InputStreamReader(stream),72357);
            this.stk = new StringTokenizer("");
        }
        public MyScanner(FileReader fr){
            this.br = new BufferedReader(fr);
            this.stk = new StringTokenizer("");
        }
        public String next() throws IOException {
            while(!stk.hasMoreElements()){
                String line = br.readLine();
                if(line == null)
                    return null;
                stk = new StringTokenizer(line);
            }
            return stk.nextToken();
        }
        public int nextInt()throws IOException{
            return Integer.parseInt(next());
        }

        public long nextLong()throws IOException{
            return Long.parseLong(next());
        }

        public double nextDouble()throws IOException{
            return Double.parseDouble(next());
        }

        public boolean canRead() throws IOException{
            return br.ready();
        }
    }

    class MyWriter{
        PrintWriter pw;
        public MyWriter(OutputStream out){
            this.pw = new PrintWriter(out);
        }
        public void print(Object obj){
            pw.print(obj.toString());
        }
        public void println(Object obj){
            pw.println(obj.toString());
        }
        public void close() {
            pw.close();
        }
}


import java.util.Scanner;

public class oneBased {
    static int DP[];
    static int size = Integer.MAX_VALUE / 100;

    public static int rec(long x) {

        if (x == 0)
            return 0;
        if (x <= size && DP[((int) x) - 1] != 0)
            return DP[((int) x) - 1];
        int res = 0;
        long counter = x;
        int numOfBits = 0;
        String onesString = "";
        while (counter > 0) {
            onesString += "1";
            counter /= 10;
            numOfBits++;
        }

        long ones = Long.parseLong(onesString);
        long ones2 = Long.parseLong((onesString + "1"));
        long reminder = (ones > x) ? ones - x : x - ones;
        long reminder2 = ones2 - x;
        int res1 = rec(reminder);
        res1 += numOfBits;
        int res2 = Integer.MAX_VALUE;
        if (reminder2 < x) {
            res2 = rec(reminder2);
            res2 += numOfBits + 1;
        }
        res = Math.min(res1, res2);
        if (x <= size)
            DP[((int) x) - 1] = res;
        return res;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long x = sc.nextLong();
        DP = new int[size];
        // System.out.println(rec(x));
        long x1 = Long.parseLong("81924761239462");
        long x2 = Long.parseLong("11111111111111");
        System.out.println(rec(x));

    }
    // 81924761239462

}


import java.util.Scanner;
public class OBADef
{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long num = scan.nextLong();
        System.out.println(""+prog(num,(int)(Math.log10(Math.abs(num)))+1));
    }
    public static long genUnos(long n){
        return (long)(Math.pow(10,n)-1)/9;
    }
    public static long prog(long n, int tam){
        long unos=genUnos(1+tam);
        long veces=n/unos*(1+tam);
        n%=unos;
        if(n==0) return veces;
        return veces+Math.min((1+tam)+prog(unos-n,tam-1),prog(n,tam-1));
        }
}


import java.io.BufferedReader;
    import java.io.*;
    import java.util.StringTokenizer;

    /**
     * Author: Luis Manuel Díaz Barón
     * Problem:
     * Online Judge:
     * Idea:
     * Fecha: 20/02/2013
     */

    public class Main {

        static MyScanner sc;
        static MyWriter pw;
        static String filePathWin="d:\\lmo.in";
        static String filePathLinux="/media/luismo/Trabajo/lmo.in";
        public static void main(String[] args) throws IOException {
            sc = new MyScanner(System.in);

            // sc = new MyScanner(new FileReader(filePathWin));
            // sc = new MyScanner(new FileReader(filePathLinux));

            pw = new MyWriter(System.out);

            while(sc.canRead())
                SolveSingleProblem();

            pw.close();
        }

        public static void SolveSingleProblem() throws IOException{

            long n = sc.nextLong();

            long dig = (long)Math.log10(n) + 1;

            long mirr = n;

            String s = "";
            for(int i =0; i < dig + 1; i++)
                s+="1";

            long k = Long.parseLong(s);

            long answ1 = best(n, k);

            pw.println(answ1);
        }

        static long best(long n, long k){

            if(k == 1) return n;

            int cumul = 0;
            int digits = (int)Math.log10(k) + 1;

            if(n == k){
                return digits;
            }

            if(k < n){
                return digits + best(n - k , k);
            }

            long left = digits + best( k - n, k / 10);

            long right = best(n, k / 10);

            return min(left, right);
        }

        static long min(long a, long b){
            return (a < b)? a: b;
        }

    }

    class MyScanner{
        BufferedReader br;
        StringTokenizer stk;
        public MyScanner(InputStream stream){
            this.br = new BufferedReader(new InputStreamReader(stream),72357);
            this.stk = new StringTokenizer("");
        }
        public MyScanner(FileReader fr){
            this.br = new BufferedReader(fr);
            this.stk = new StringTokenizer("");
        }
        public String next() throws IOException {
            while(!stk.hasMoreElements()){
                String line = br.readLine();
                if(line == null)
                    return null;
                stk = new StringTokenizer(line);
            }
            return stk.nextToken();
        }
        public int nextInt()throws IOException{
            return Integer.parseInt(next());
        }

        public long nextLong()throws IOException{
            return Long.parseLong(next());
        }

        public double nextDouble()throws IOException{
            return Double.parseDouble(next());
        }

        public boolean canRead() throws IOException{
            return br.ready();
        }
    }

    class MyWriter{
        PrintWriter pw;
        public MyWriter(OutputStream out){
            this.pw = new PrintWriter(out);
        }
        public void print(Object obj){
            pw.print(obj.toString());
        }
        public void println(Object obj){
            pw.println(obj.toString());
        }
        public void close() {
            pw.close();
        }
    }


import java.util.LinkedList;
import java.util.Scanner;

public class T440C {
	private long[] N = {
			1,
			11,
			111,
			1111,
			11111,
			111111,
			1111111,
			11111111,
			111111111,
			1111111111,
			11111111111L,
			111111111111L,
			1111111111111L,
			11111111111111L,
			111111111111111L,
			1111111111111111L
		};

	public long solve(long n) {
		long ans = Long.MAX_VALUE;
		LinkedList<long[]> l = new LinkedList<long[]>();
		l.add(new long[] {n, 0});
		long[] e;
		while (!l.isEmpty()) {
			e = l.getFirst();
			l.removeFirst();

			if (e[0] == 0 || e[1] > ans) {
				ans = Math.min(ans, e[1]);
				continue;
			}
			for (int i = N.length - 1; i >= 0; i --) {
				if (e[0] >= N[i]) {
					long x,y;

					y = e[1] + (e[0] / N[i]) *(i + 1);
					x = e[0] % N[i];
					l.add(new long[] {x, y});

					if (i < N.length - 1) {
						y = e[1] + (i + 1) + 1;
						x = N[i + 1] - e[0];
						l.add(new long[] {x, y});

					}
					break;
				}
			}
		}
		return ans;
	}
	public static void main(String[] args) {
		T440C t = new T440C();

		//long n = 973546235465729L;
		Scanner in = new Scanner(System.in);
		long n = in.nextLong();

		System.out.println(t.solve(n));
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class C {
    static int inf = (int) 1e6;
    static int[][][][] DP;
    static String number;

    public static int get(int index, int pos, int neg, int carry) {
        int truCarry = carry - 50;
        if (index == 17) {
            if (pos + neg + truCarry == 0) {
                return 0;
            } else {
                return inf;
            }
        }
        if (DP[index][pos][neg][carry] != -1)
            return DP[index][pos][neg][carry];
        int res = inf;
        for (int p = 0; p <= Math.min(15, pos); p++)
            for (int n = 0; n <= Math.min(15, neg); n++) {
                int sum = pos - neg + truCarry;
                int currentBit = (sum % 10 + 10) % 10;
                int nextCarry = sum > 0 ? (sum / 10) : ((sum - 9) / 10);
                if (currentBit != number.charAt(index) - '0')
                    continue;
                res = Math.min(res,
                        get(index + 1, pos - p, neg - n, nextCarry + 50)
                                + (p + n) * (index + 1));
            }
        return DP[index][pos][neg][carry] = res;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        int size = 50;
        DP = new int[20][size][size][100];
        for (int i = 0; i < 20; i++)
            for (int j = 0; j < size; j++)
                for (int k = 0; k < size; k++)
                    Arrays.fill(DP[i][j][k], -1);
        number = "" + n;
        while (number.length() < 17)
            number = "0" + number;
        number = new StringBuffer(number).reverse().toString();
        int res = inf;
        for (int pos = 0; pos < size; pos++)
            for (int neg = 0; neg < size; neg++)
                res = Math.min(res, get(0, pos, neg, 50));
        System.out.println(res);
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeSet;

/**
 *
 *
 * 10 5 8 1 10 3 6 2 9 7 4 4 2 6 3 1 9 10 5 8 7
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static PrintWriter out;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        //PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        long n = in.nextLong();
        int result = cal(n, -1);

        out.println(result);

        out.close();
    }

    public static int cal(long val, long last) {
        if(val == 0){
            return 0;
        }
        long start = 1;
        int c = 1;
        while (start < val) {
            start *= 10;
            start++;
            c++;
        }

        if (start > val ) {

            long a = start / 10;

            int result = (int) ((c - 1) + cal(val - a, start));
            if (last != start) {
                result = Math.min(result, c + cal(start - val, start));
            }
            return result;
        } else {
            return c;
        }
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            } else {
                return y - o.y;
            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    public static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        public void update(int index, int value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public int get(int index) {
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.*;

public class Main {
	public static void main(String arg[])throws Exception{
		BufferedReader bff = new BufferedReader(new InputStreamReader(System.in));
		long n = Long.parseLong(bff.readLine());
		System.out.println(ones(n));
	}
	private static int digs(long n){
		return (int) Math.log10(n) + 1;
	}
	private static long fillOne(int n){
		long res = 1;
		while(n-- > 1)
			res = res * 10 + 1;
		return res;
	}

	private static long ones (long n){
		if(n <= 6) return n;
		int dig = digs(n);
		long aux = fillOne(dig), one = aux, diff = n;
		int c = 0;
		//System.out.println(aux);
		while(aux < n){
			c++;
			diff = n - aux;
			aux += one;
		}
		//System.out.println(diff + " " + aux);
		long res;
		if(c > 0)
			res = Math.min(c*dig + ones(diff), ++c * dig + ones(aux - n));
		else
			res = ++c * dig + ones(aux - n);
		aux = fillOne(dig + 1);
		if(aux - n < n)
			res = Math.min(res, dig + 1 + ones(aux - n));
		return res;
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class OneBasedArithmetic {
    public static void main(String[] args) {
        FastReader sc = new FastReader();
        long n = sc.nextLong();
        long[] ones = new long[17];
        for(int i = 1; i < 17; ++i){
            ones[i] = 10 * ones[i - 1] + 1;
        }

        //System.out.println(Arrays.toString(ones));
        long ans = dfs(ones, n, 16);
        System.out.println(ans);
    }

    private static long dfs(long[] ones, long n, int idx){

        //System.out.println(n +", " + idx);
        long quot = n / ones[idx];
        n %= ones[idx];
        long onesUsedHere = quot * idx;
        //System.out.println("q : " + quot +", n : " + n);
        if(n == 0) return onesUsedHere;
        else
            return onesUsedHere + Math.min(dfs(ones, n, idx - 1),
                    idx + dfs(ones, ones[idx] - n, idx - 1));
    }
    private static class FastReader {
        private final BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] readArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; ++i)
                arr[i] = nextInt();

            return arr;
        }

        List<Integer> readList(int n) {
            List<Integer> list = new ArrayList<>();
            for (int i = 0; i < n; ++i)
                list.add(nextInt());
            return list;
        }

        long[] readLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; ++i)
                arr[i] = nextLong();

            return arr;
        }

        double[] readDoubleArray(int n) {
            double[] arr = new double[n];
            for (int i = 0; i < n; ++i)
                arr[i] = nextDouble();
            return arr;
        }
    }
}


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

public class Main {

	static PrintWriter out;

	static double EPS = 1e-9;
	static int INF = (int) 1e9;
	static long LINF = (long) 1e18;
	static int MOD = (int) 1e9 + 7;
	static double PI = Math.acos(-1);

	static int go(long n) {
		if (n == 0) {
			return 0;
		}
		long k = 1;
		int cnt = 1;
		while (k * 10 + 1 < n) {
			k = k * 10 + 1;
			cnt++;
		}
		return (int) Math.min(go(n % k) + n / k * cnt, go((k * 10 + 1 - n) % k) + (cnt + 1) +  (k * 10 + 1 - n) / k * cnt);
	}

	static void solve() {
		long n = Input.nextLong();
		out.println(go(n));
	}

	public static void main(String[] args) {
		out = new PrintWriter(System.out);
//		long stime = System.currentTimeMillis();
		solve();
//		out.println("\nTime elapsed: " + (System.currentTimeMillis() - stime) + "ms");
		out.close();
	}

	static class SegmentTree {
		int maxn = 100010;
		long[] st = new long[4 * maxn];
		void update(int node, int i, int L, int R, long val) {
			if (i < L || i > R) return;
			if (L == R) {st[node] += val; return;}
			update(node << 1, i, L, (L + R) >> 1, val);
			update((node << 1) + 1, i, ((L + R) >> 1) + 1, R, val);
			st[node] = st[node << 1] + st[(node << 1) + 1];
		}
		long query(int node, int l, int r, int L, int R) {
			if (l > R || r < L) return 0;
			if (l <= L && r >= R) return st[node];
			return query(node << 1, l, r, L, (L + R) >> 1) + query((node << 1) + 1, l, r, ((L + R) >> 1) + 1, R);
		}
	}

	static class Matrix {
		int maxn = 2;
		int[][] x = new int[maxn][maxn];
		Matrix mul(Matrix A) {
			Matrix res = new Matrix();
			for (int i = 0; i < maxn; i++) {
				for (int k = 0; k < maxn; k++) {
					for (int j = 0; j < maxn; j++) {
						res.x[i][j] = (int) ((res.x[i][j] + (long) x[i][k] * A.x[k][j]) % MOD);
					}
				}
			}
			return res;
		}
		Matrix pow(long k) {
			Matrix res = this, T = this; k--;
			while (k > 0) {
				if ((k & 1) > 0) {
					res = res.mul(T);
				}
				T = T.mul(T); k >>= 1;
			}
			return res;
		}
	}

	static class Pair implements Comparable<Pair> {
		long fi, se;
		Pair(long fi, long se) {
			this.fi = fi;
			this.se = se;
		}
		public int compareTo(Pair oth) {
			if (fi > oth.fi) return +1;
			if (fi < oth.fi) return -1;
			if (se > oth.se) return +1;
			if (se < oth.se) return -1;
			return 0;
		}
	}

	static long gcd(long a, long b) {
		long r;
		while (b != 0) {
			r = a % b;
			a = b;
			b = r;
		}
		return a;
	}

	static long lcm(long a, long b) {
		return a / gcd(a, b) * b;
	}

	static long fpow(long n, long k, int p) {
		long r = 1;
		for (; k > 0; k >>= 1) {
			if (k % 2 == 1) {
				r = r * n % p;
			}
			n = n * n % p;
		}
		return r;
	}

	static BigInteger FloorOfNthRoot(BigInteger x, int n) {
	    int sign = x.signum();
	    if (n <= 0 || sign < 0) {
	        throw new IllegalArgumentException();
	    }
	    if (sign == 0) {
	        return BigInteger.ZERO;
	    }
	    if (n == 1) {
	        return x;
	    }
	    BigInteger a;
	    BigInteger bigN = BigInteger.valueOf(n);
	    BigInteger bigNMinusOne = BigInteger.valueOf(n - 1);
	    BigInteger b = BigInteger.ZERO.setBit(1 + x.bitLength() / n);
	    do {
	        a = b;
	        b = a.multiply(bigNMinusOne).add(x.divide(a.pow(n - 1))).divide(bigN);
	    }
	    while (b.compareTo(a) == -1);
	    return a;
	}

	static BigDecimal sqrt(BigDecimal A, int SCALE) {
	    BigDecimal x0 = new BigDecimal("0");
	    BigDecimal x1 = new BigDecimal(Math.sqrt(A.doubleValue()));
	    while (!x0.equals(x1)) {
	        x0 = x1;
	        x1 = A.divide(x0, SCALE, BigDecimal.ROUND_HALF_UP);
	        x1 = x1.add(x0);
	        x1 = x1.divide(BigDecimal.valueOf(2), SCALE, BigDecimal.ROUND_HALF_UP);
	    }
	    return x1;
	}

	static class Input {
		static StringTokenizer token = null;
		static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//		static BufferedReader in;
//		static {
//			try {
//				in = new BufferedReader(new FileReader("in.txt"));
//			} catch (IOException e) {
//			}
//		}
		static int nextInt() {
			return Integer.parseInt(nextString());
		}
		static long nextLong() {
			return Long.parseLong(nextString());
		}
		static double nextDouble() {
			return Double.parseDouble(nextString());
		}
		static String nextString() {
			try {
				while (token == null || !token.hasMoreTokens()) {
					token = new StringTokenizer(in.readLine());
				}
			} catch (IOException e) {
			}
			return token.nextToken();
		}
	}
}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author sousnake
 */
public class C440_cpy {
    static long arr[];
    public static void main(String[] args) throws IOException {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            long n = Long.parseLong(br.readLine());
            arr = new long[20];
            for(int i=1;i<=16;i++){
                arr[i]=arr[i-1]*10+1;
            }
            System.out.println(fuc(n,16));
    }
    public static long fuc(long n, int d){
        long q =(n/arr[d]*d);
        n %=arr[d];
        if (n==0)
            return q;
        else return q+Math.min(d+fuc(arr[d]-n,d-1),fuc(n,d-1));
    }
}


import java.util.*;

public class candy {
   public static void main (String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int k = sc.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) {
         a[i] = sc.nextInt();
      }
      int day = 0;
      int arya = 0;
      for (int i = 0; i < n; i++) {
         if (a[i] + arya < 8) {
            day++;
            k -= a[i] + arya;
            arya = 0;
         if (k <= 0) {
            System.out.println(day);
            break;
         }

         }
         else if (a[i] + arya >= 8) {
            day++;
            k -= 8;
            arya += a[i] - 8;
            if (k <= 0) {
               System.out.println(day);
               break;
              }

         }
      }
      if (k > 0) {
         System.out.println(-1);
      }
   }
}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.Scanner;

/**
 *
 * @author Lotus
 */
public class B {

    public static void main(String[]args)
    {
        Scanner input = new Scanner (System.in);
        String t  = input.next();
        String ices = input.next();
        int [] counter = new int[9];

            for(int j=0; j<ices.length();j++)
            {

                    if(ices.charAt(j)=='9')
                        counter[6]++;
                    else if(ices.charAt(j)=='5' )
                    {
                         counter[2]++;

                    }
                     else
                    counter[ices.charAt(j)-48]++;

            }
        int count=0;
        int n;
        boolean m=false;
        while(m!=true)
        {
         for(int i=0; i<t.length();i++)
            {

                     if(t.charAt(i)=='9')
                         n=6;

                    else if(t.charAt(i)=='5' )
                    {
                        n=2;

                    }
                     else
                   n=t.charAt(i)-48;

                     counter[n]--;
                   if( counter[n]<0)
                   {
                       m=true;
                       break;

                   }
            }
        if(!m)
         count++;

            }

        System.out.println(count);

    }

}


import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) throws IOException {

        Scanner sc = new Scanner(System.in);
        int n, k;
        n = sc.nextInt();
        k = sc.nextInt();
        String buff_s = sc.next();
        char[] s = buff_s.toCharArray();

        boolean ans = false;
        boolean cur = true;

        int cnt = 0;
        for (int i = 0; i < n && cur; i++) {

            if (s[i] == 'N')
                cnt++;
            else
                cnt = 0;

            if (cnt > k)
                cur = false;

        }

        for (int is = 0; is <= n - k && cur && !ans; is++) {

            for (int j = is; j < is + k && cur; j++) {
                if (s[j] == 'Y')
                    cur = false;
            }

            if (cur) {

                if (is > 0 && s[is - 1] == 'N')
                    cur = false;

                if (is + k < n && s[is + k] == 'N')
                    cur = false;

            }

            if (cur) {

                ans = true;

            }

            cur = true;

        }

        if (ans) {

            System.out.println("YES");

        } else {

            System.out.println("NO");

        }

    }

}


import java.awt.Point;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.io.*;
import java.math.BigInteger;
import static java.math.BigInteger.*;
import java.util.*;
public class C{
	int n;
	int[][]min;
	int[][]max;
	int[][]active;
	int[]pFlow;
	int inf=Integer.MAX_VALUE/100;
	int[]res;
	int allCost=0;
	void solve()throws Exception
	{

		n=nextInt();
		min=new int[n][n];
		max=new int[n][n];
		active=new int[n][n];
		int sum=0;
		for(int step=1;step<=n*(n-1)/2;step++)
		{
			int a=nextInt()-1;
			int b=nextInt()-1;
			min[a][b]=nextInt();
			max[a][b]=nextInt();
			active[a][b]=nextInt();
			sum+=max[a][b];
		}
		res=new int[]{inf,-inf};
		sum++;
		pFlow=new int[n];
		rec(0,1);
		if(res[0]==inf)
			res=new int[]{-1,-1};
		System.out.println(res[0]+" "+res[1]);
	}

	private void rec(int a, int b) {
		if(res[0]<pFlow[0])
			return;
		if(a==n-1)
		{
			if(pFlow[0]<res[0] || (res[0]==pFlow[0] && allCost>res[1]))
			{
				res[0]=pFlow[0];
				res[1]=allCost;

			}
			return ;
		}
		if(b==n)
		{
			if(a!=0 && pFlow[a]!=0)
				return;
			rec(a+1,a+2);
		}
		else
		{
			for(int x=min[a][b];x<=max[a][b];x++)
			{
				int curCost=x*x+(x>0?active[a][b]:0);
				pFlow[a]+=x;
				pFlow[b]-=x;
				allCost+=curCost;
				rec(a,b+1);
				allCost-=curCost;
				pFlow[a]-=x;
				pFlow[b]+=x;
			}
		}

	}

	BufferedReader reader;
	PrintWriter writer;
	StringTokenizer stk;
	void run()throws Exception
	{
		reader=new BufferedReader(new InputStreamReader(System.in));
		stk=null;
		writer=new PrintWriter(System.out);
		solve();
		reader.close();
		writer.close();
	}
	int nextInt()throws Exception
	{
		return Integer.parseInt(nextToken());
	}
	long nextLong()throws Exception
	{
		return Long.parseLong(nextToken());
	}
	double nextDouble()throws Exception
	{
		return Double.parseDouble(nextToken());
	}
	String nextString()throws Exception
	{
		return nextToken();
	}
	String nextLine()throws Exception
	{
		return reader.readLine();
	}
	String nextToken()throws Exception
	{
		if(stk==null || !stk.hasMoreTokens())
		{
			stk=new StringTokenizer(nextLine());
			return nextToken();
		}
		return stk.nextToken();
	}

	public static void main(String[]args) throws Exception
	{
		new C().run();

	}

}


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int x1 = in.nextInt();
        int y1 = in.nextInt();
        int x2 = in.nextInt();
        int y2 = in.nextInt();
        int LocPar1, LocPar2;

        a *= 2;
        b *= 2;

        LocPar1 = x1;
        LocPar2 = y1;
        x1 = LocPar1 + LocPar2;
        y1 = LocPar2 - LocPar1;

        LocPar1 = x2;
        LocPar2 = y2;
        x2 = LocPar1 + LocPar2;
        y2 = LocPar2 - LocPar1;

        if (x1>0)
            x1 = x1/a+1;
        else
            x1 = x1/a;
        if (x2>0)
            x2 = x2/a+1;
        else
            x2 = x2/a;
        if (y1>0)
            y1 = y1/b+1;
        else
            y1 = y1/b;
        if (y2>0)
            y2 = y2/b+1;
        else
            y2 = y2/b;
        System.out.println(Math.max(Math.abs((y2-y1)),Math.abs((x2-x1))));
    }
}


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

public class codeforces {
    static class pair {
        int x;
        int y;

        public pair(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static long sqrt(long x) {
        long s = 0, e = x, root = 0;
        while (s <= e) {
            long mid = (s + e) / 2;
            if (mid * mid == x)
                return mid;
            if (mid * mid < x) {
                root = mid;
                s = mid + 1;
            } else
                e = mid - 1;
        }
        return root;
    }

    public static long power(int a, int b) {
        if (a == 0 || b == 0)
            return 1;
        long ans = power(a, b / 2);
        ans *= ans;
        if (b % 2 == 1)
            ans *= a;
        return ans;
    }

    public static boolean isSubsequence(String a, String b){
        int m=a.length(),n=b.length(),i=0,j=0;
        while(i<m && j<n){
            if(a.charAt(i)==b.charAt(j)){
                i++;
            }
            j++;
        }
        return i==m;
    }

    public static boolean isprime(long x) {
        if (x == 1)
            return false;
        if (x < 4)
            return true;
        int root = (int) Math.sqrt(x);
        for (int i = 2; i <= root; i++) {
            if (x % i == 0)
                return false;
        }
        return true;
    }

    public static long max(long a, long b) {
        return Math.max(a, b);
    }

    public static long min(long a, long b) {
        return Math.min(a, b);
    }

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder str = new StringBuilder();
        PrintWriter out = new PrintWriter(System.out);
        // int t = Integer.parseInt(br.readLine());
        ArrayList<Long> a=new ArrayList<>();
        String[] l=br.readLine().split(" ");
        long n=Long.parseLong(l[0]);
        int k=Integer.parseInt(l[1]);
        long root=(long) Math.sqrt(n);
        int c=0;
        for(long i=1;i<=root;i++){
            if(n%i==0){
                c++;
                a.add(i);
                if(c==k){
                    out.println(i);
                    break;
                }
            }
        }
        // for(int x:a)
        // out.println(x);
        l:
        if(k>c){
            boolean b=false;
            if(root*root==n)
            b=true;
            if(b && 2*c-1<k){
                out.println("-1");
                break l;
            }
            else
            if(!b && 2*c<k){
                out.println("-1");
                break l;
            }
            else
            if(b){
                str.append(n/a.get(c-(k-c+1))).append("\n");
                out.print(str);
                break l;
            }
            else{
                str.append(n/a.get(c-(k-c))).append("\n");
                out.print(str);
                break l;
            }
        }
        // if(k>c)
        // out.print("-1");
        out.close();
    }
}


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

public class Main implements Runnable {

	public void _main() throws IOException {
		int x = nextInt();
		int y = nextInt();
		int z = nextInt();
		int[] a = new int[]{x, y, z};
		Arrays.sort(a);
		x = a[0];
		y = a[1];
		z = a[2];
		int k = nextInt();
		if (k > x + y + z - 3)
			k = x + y + z - 3;
		int b = k / 3;
		long dx = 0, dy = 0, dz = 0;
		if (b > x - 1) {
			dx = x - 1;
			k -= dx;
			b = k / 2;
			if (b > y - 1) {
				dy = y - 1;
				k -= dy;
				dz = Math.min(k, z - 1);
			}
			else {
				dy = dz = b;
				k -= 2 * b;
				if (k > 0) {
					--k;
					++dz;
				}
			}
		}
		else {
			dx = dy = dz = b;
			k -= 3 * b;
			if (k > 0) {
				--k;
				++dz;
			}
			if (k > 0) {
				--k;
				++dy;
			}
		}
		dx = Math.min(dx, x - 1);
		dy = Math.min(dy, y - 1);
		dz = Math.min(dz, z - 1);
		out.println((dx + 1) * (dy + 1) * (dz + 1));
	}

	private BufferedReader in;
	private PrintWriter out;
	private StringTokenizer st;

	private String next() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String rl = in.readLine();
			if (rl == null)
				return null;
			st = new StringTokenizer(rl);
		}
		return st.nextToken();
	}

	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	private long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	private double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	public static void main(String[] args) {
		Locale.setDefault(Locale.UK);
		new Thread(new Main()).start();
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			_main();

			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(202);
		}
	}

}


//package Practice;
import java.util.*;
//import java.lang.Math;
public class ProblemA {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	if(n<1200) {
		System.out.println(1200);
	}
	else if(n<1400) {
		System.out.println(1400);
	}
	else if(n<1600) {
		System.out.println(1600);
	}
	else if(n<1900) {
		System.out.println(1900);
	}
	else if(n<2100) {
		System.out.println(2100);
	}
	else if(n<2300) {
		System.out.println(2300);
	}
	else if(n<2400) {
		System.out.println(2400);
	}
	else if(n<2600) {
		System.out.println(2600);
	}
	else {
		System.out.println(3000);
	}

	}
}


import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.Math.PI;
import static java.lang.Math.min;
import static java.lang.System.arraycopy;
import static java.lang.System.exit;
import static java.util.Arrays.copyOf;

import java.util.LinkedList;
import java.util.List;
import java.util.Iterator;
import java.io.FileReader;
import java.io.FileWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Deque;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.Comparator;
import java.lang.StringBuilder;
import java.util.Collections;
import java.util.*;
import java.text.DecimalFormat;

public class Solution {

	// static class Edge{
		// int u, v, w;
		// Edge(int u, int v, int w){
			// this.u = u;
			// this.v = v;
			// this.w = w;
		// }
	// }

	// static class Pair{
		// int first, second;
		// Pair(int first, int second){
			// this.first = first;
			// this.second = second;
		// }
		// @Override
		// public String toString(){
			// return (this.first+" "+this.second);
		// }
	// }

	// static class Tuple{
		// int first, second, third;
		// Tuple(int first, int second, int third){
			// this.first = first;
			// this.second =second;
			// this.third = third;
		// }
		// @Override
		// public String toString(){
			// return first+" "+second+" "+third;
		// }
	// }

	// static class Point{
		// int x, y;
		// Point(int x, int y){
			// this.x = x;
			// this.y = y;
		// }
	// }

	static BufferedReader in;
	static PrintWriter out;
	static StringTokenizer tok;
	static int dx[] = {-1,0,1,0};
	static int dy[] = {0,-1,0,1};
	static int MOD =   998244353;//(int)1e9+7;
	static boolean vis[];
	static ArrayList<Integer> adj[];

	private static void solve() throws IOException{
		int rating[] = {1200,1400,1600,1900,2100,2300,2400,2600,3000};
		int n = scanInt();
		for(int i = 0; i<rating.length; ++i)
			if(rating[i] > n){
				out.println(rating[i]);
				break;
			}
	}

	private static int[] inputArray(int n) throws IOException {
		int arr[] = new int[n];
		for(int i=0; i<n; ++i)
			arr[i] = scanInt();
		return arr;
	}

	private static void displayArray(int arr[]){
		for(int i = 0; i<arr.length; ++i)
			out.print(arr[i]+" ");
		out.println();
	}

	public static void main(String[] args) {
		try {
			long startTime = System.currentTimeMillis();

			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			//in = new BufferedReader(new FileReader("input.txt"));
			//out = new PrintWriter(new FileWriter("output.txt"));
			// int test=scanInt();
			// for(int t=1; t<=test; t++){
				// out.print("Case #"+t+": ");
				solve();
			// }

			long endTime   = System.currentTimeMillis();
			long totalTime = endTime - startTime;
			// out.println(totalTime+"----------  "+System.currentTimeMillis() );
			in.close();
			out.close();

		} catch (Throwable e) {
			e.printStackTrace();
			exit(1);
		}
	}
	static int scanInt() throws IOException {
		return parseInt(scanString());
	}

	static long scanLong() throws IOException {
		return parseLong(scanString());
	}
	static double scanDouble() throws IOException {
		return parseDouble(scanString());
	}

	static String scanString() throws IOException {
		if (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}
	static String scanLine() throws IOException {
		return in.readLine();
	}

}


//package Rishab;
import java.io.*;
import java.text.DecimalFormat;
import java.util.*;
import java.util.Map.Entry;

public class Main {
	static int dirx[]= {-1,1,0,0};static int diry[]= {0,0,-1,1};
	static final PrintWriter out = new PrintWriter(System.out, true);
    static final FastScanner sc = new FastScanner();
	public static void main(String[] args)  {
//		int t=sc.nextInt();
//		while(t-->0) {
		  solve();
//		}
	}
	static void solve() {
		int n=sc.nextInt();
		int x=0;
		if(n < 1200) x= 1200;
	    else if(n < 1400) x=1400;
	    else if(n < 1600)  x= 1600;
	    else if(n < 1900)  x=1900;
	    else if(n < 2100) x= 2100;
	    else if(n < 2300)  x= 2300;
	    else if(n < 2400)  x= 2400;
	    else if(n < 2600) x= 2600;
	    else if(n < 3000)  x= 3000;
		System.out.println(x);
	}

static long Cr(int n, int r,int mod,long fac[],long inv[]) {
    	if(n<r) return 0L;
		return fac[n]*(inv[r]*inv[n - r]%mod)%mod;

//    	long fac[]=new long[100000];
//    	long inv[]=new long[100000];
//    	fac[0]=fac[1]=1;
//    	fac[i]=modmul(fac[i-1],i,m);
//		inv[i] =modpow(fac[i], m - 2,m);
//    	long ans = 1;
//	    ans *= (Cr(n-x,more,m,fac,inv)*fac[more])%m;
//	    ans %= m;

}
	static boolean [] sieveOfEratosthenes(int n){
	    boolean prime[] = new boolean[n + 1];
	    for (int i = 0; i <= n; i++)
	        prime[i] = true;

	    for (int p = 2; p * p <= n; p++)
	    {
	        if (prime[p] == true)
	        {
	            for (int i = p * p; i <= n; i += p)
	                prime[i] = false;
	        }
	    }
	    prime[1]=prime[0]=false;
	    return prime;
	}
	static void divisors(int n,ArrayList a[]) {
		for(int i=1;i<=n;i++) {
			for(int j=i;j<=n;j+=i) {
				a[j].add(i);
			}
		}
	}
	 static long modDivide(long a, long b, int m)
	  {
	      a = a % m;
	      long inv = modInverse(b, m);
	      if (inv == -1) return -1;
	      else
	      {
	        long c = (inv * a) % m ;
	        return c;
	      }
	  }
	  static long modInverse(long a, int m){
	        long g = gcd(a, m);
	        if (g != 1) return -1;
	        else
	        {
	        	return modpow(a,m-2,m);
	        }
	    }
	  public static double logx(long m,int x){
	        double result = (double)(Math.log(m) / Math.log(x));

	        return result;
	    }
	     static double setPrecision(double ans,int k){
	    	 double y=Math.pow(10,k);
	    	 return Math.round(ans*y)/y;
	     }
	  public static double log2(double m)
	    {
	        double result = (double)(Math.log(m) / Math.log(2));

	        return result;
	    }
	  static int countDivisors(int n)
	    { int ans=0;
	        for (int i=1; i<=Math.sqrt(n); i++)
	        {
	            if (n%i==0)
	            {
	                if (n/i == i) ans++;
//	                    System.out.print(" "+ i);

	                else ans+=2;
//	                    System.out.print(i+" " + n/i + " " );
	            }
	        }
			return ans;
	    }
	  static ArrayList<Integer> pyyy = new ArrayList<Integer>();
		static void sieveppp(int MAX)
		{
		    int[] isPrime=new int[MAX+1];

		    for (int i = 2; i<= MAX; i++)
		    {
		        if (isPrime[i] == 0)
		        {
		        	pyyy.add(i);
		            for (int j = 2; i * j<= MAX; j++)
		                isPrime[i * j]= 1;
		        }
		    }
		}
		 static int phi(int n) {
			 ///   call sieveppp(n) in main fn
		      int res = n;
		      for (int i=0; pyyy.get(i)*pyyy.get(i) <= n; i++)
		      {
		          if (n % pyyy.get(i)== 0)
		          {
		              res -= (res / pyyy.get(i));
		              while (n % pyyy.get(i)== 0)
		              n /= pyyy.get(i);
		          }
		      }
		      if (n > 1)
		      res -= (res / n);

		      return res;
		  }
	public static void sort(long[] arr){//because Arrays.sort() uses quicksort which is in worst O(n^2)
		//Collections.sort() uses merge sort
		ArrayList<Long> ttttt = new ArrayList<Long>();
		for(long y: arr)ttttt.add(y);Collections.sort(ttttt);
		for(int i=0; i < arr.length; i++)arr[i] = ttttt.get(i);
	}
	public static void sort(int[] arr){//because Arrays.sort() uses quicksort which is dumb
		//Collections.sort() uses merge sort
		ArrayList<Integer> ttttt = new ArrayList<>();
		for(int y: arr)ttttt.add(y);Collections.sort(ttttt);
		for(int i=0; i < arr.length; i++)arr[i] = ttttt.get(i);
	}
	static boolean check(double[] a,double m,int n,int k) {
		int ans=0;
		for(int i=0;i<n;i++) {
			ans+=(Math.floor(a[i]/m));
			if(ans>=k) return true;
		}
		return ans>=k;
	}
	     static boolean isKthBitSet(long n, int k) {
			if ((n & (1 << (k - 1))) > 0)
			return true;
			else
			return false;

		 }
	     static long modpow(long a,long b,int m) {
	    	 if(b==0) return 1;
	    	 if(b==1) return a;
	    	 long ans=0;
	    	 long t=modpow(a,b/2,m);
	    	 ans=modmul(t,t,m);
	    	 if(b%2!=0) ans=modmul(a,ans,m);
	    	 return ans;
	     }
		static long modmul(long a,long b,int m) {
			return mod(mod(a,m)*mod(b,m),m);
		}
		static long mod(long x,int m) {
			return ((x%m)+m)%m;
		}
		 static int octaltodecimal(int deciNum)
		    {
		        int octalNum = 0, countval = 1;
		        int dNo = deciNum;
		        while (deciNum != 0) {

		            // decimals remainder is calculated
		            int remainder = deciNum % 8;

		            // storing the octalvalue
		            octalNum += remainder * countval;

		            // storing exponential value
		            countval = countval * 10;
		            deciNum /= 8;
		        }
		       return octalNum;
		    }

	  public static int floorSqrt(int x)
	    {
	        // Base Cases
	        if (x == 0 || x == 1)
	            return x;

	        // Do Binary Search for floor(sqrt(x))
	        int start = 1, end = x, ans=0;
	        while (start <= end)
	        {
	            int mid = (start + end) / 2;

	            // If x is a perfect square
	            if (mid*mid == x)
	                return mid;

	            // Since we need floor, we update answer when mid*mid is
	            // smaller than x, and move closer to sqrt(x)
	            if (mid*mid < x)
	            {
	                start = mid + 1;
	                ans = mid;
	            }
	            else   // If mid*mid is greater than x
	                end = mid-1;
	        }
	        return ans;
	    }
		static int div(int n,int b) {
			int g=-1;
			for(int i=2;i<=Math.sqrt(n);i++) {
				if(n%i==0&&i!=b) {
					g=i;
					break;
				}
			}
			return g;
		}

	  public static long gcd(long a, long a2)
	    {
	        if (a == 0)
	            return a2;

	        return gcd(a2%a, a);
	    }
	   public static long lcm(long a, long b)
	  {
	     return (a*b)/gcd(a, b);
	  }
       public static boolean isPrime(int n) {
           if (n <= 1) {
               return false;
           }
           if (n == 2) {
               return true;
           }
           if (n % 2 == 0) {
               return false;
           }
           for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {
               if (n % i == 0) {
                   return false;
               }
           }
           return true;
       }

       static class FastScanner {
           BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
           StringTokenizer strToken = new StringTokenizer("");
           String next() {
        	   while (!strToken.hasMoreTokens()) {
        		   try {
        			   strToken = new StringTokenizer(input.readLine());
        		   }  catch (IOException e) {
        			    e.printStackTrace();
        			  }
        	   } return strToken.nextToken();
        	}
           String nextLine() {
        	   String strrrrr = ""; try {
        		   strrrrr = input.readLine();
        	   } catch (IOException e) {
        			   e.printStackTrace();
        		}
        	   return strrrrr;
           }
           int nextInt() {
        	   return Integer.parseInt(next());
        	}
           int[] nextIntArray(int n) {
        	   int[] a = new int[n];
        	   for (int i = 0; i < n; i++) a[i] = nextInt();
        	   return a;
           }
           long nextLong() {
        	   return Long.parseLong(next());
        	}
           long[] nextLongArray(int n) {
        	   long[] a = new long[n];
        	   for (int i = 0; i < n; i++) a[i] = nextLong();
        	   return a;
        	}
           double nextDouble() {
        	   return Double.parseDouble(next());
           }
       }
}
class DisjointSet {

    private int[] parent;
    private int[] rank;

    public DisjointSet(int n) {
        if (n < 0) throw new IllegalArgumentException();
        parent = new int[n];
        for(int i=0;i<n;i++) parent[i]=i;
        rank = new int[n];
    }
    public void reset(int x) {
    	parent[x]=x;
    }
    public int find(int x) {
        if (parent[x] == x) return x;
        return parent[x] = find(parent[x]); // Path compression by halving.
    }

    // Return false if x, y are connected.
    public boolean union(int x, int y) {
        int rootX = find(x);
        int rootY = find(y);
        if (rootX == rootY) return false;

        // Make root of smaller rank point to root of larger rank.
        if (rank[rootX] < rank[rootY]) parent[rootX] = rootY;
        else if (rank[rootX] > rank[rootY]) parent[rootY] = rootX;
        else {
            parent[rootX] = rootY;
            rank[rootY]++;
        }

        return true;
    }
}

class Pair{
  int value;
  int distance;
  Pair(int value,int distance){
      this.value=value;
      this.distance=distance;
  }

}
class sortbydistance implements Comparator<Pair>{

	@Override
	public int compare(Pair o1, Pair o2) {
		return o1.distance-o2.distance;
	}

}
class Solution
{
  static int[] dijkstra(int n, ArrayList<ArrayList<ArrayList<Integer>>> adj,ArrayList<Integer>ans)
  {
  	 PriorityQueue<Pair>set=new PriorityQueue<>(new sortbydistance());
      int dis[]=new int[n];
      Arrays.fill(dis,Integer.MAX_VALUE);
      dis[0]=0;
      while(set.isEmpty()==false) {
      	Pair p=set.poll();
      	int u=p.value;
      	for(int i=0;i<adj.get(u).size();i++) {
      		int v=adj.get(u).get(i).get(0);
      		int wt=adj.get(u).get(i).get(1);
      		if(dis[v]>dis[u]+wt) {
      			if(dis[v]!=Integer.MAX_VALUE) {
      				set.remove(new Pair(dis[v],v));
      			}
      			dis[v]=dis[u]+wt;
      			ans.add(v);
      			set.add(new Pair(v,dis[v]));
      		}

      	}
      }

      return dis;
  }
}

/*    Points-
 *
 *    1) when need max and min both use treeset if duplicates are there then use treeset<int []> and add a[1] as unique
 *    number but imp is to make new TreeSet<>((x,y)->(x[0]==y[0])?(x[1]-y[1]):(x[0]-y[0]))  in this x[0]==y[0] cond.
 *    is important
 *
 *    2) n!/2 is not fac[n]/2 it is modmul(fac[n],inv[2],m)
 *
 *    3) if sorting can think of TreeSet also bro or want max and min use tree set as it has last and first function
 *
 *    4) if dp is not optimisable then think of changing the defination of dp states
*/

class pairs{
	int a,b;
	pairs(int a,int b){
		this.a=a;this.b=b;
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

/*

 */
public class MikesSequence {

	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		PrintWriter out=new PrintWriter(System.out);
		TreeSet<Integer> ts=new TreeSet<>();
		ts.add(3000);
		ts.add(2600);
		ts.add(2400);
		ts.add(2300);
		ts.add(2100);
		ts.add(1900);
		ts.add(1600);
		ts.add(1400);
		ts.add(1200);
		int x=fs.nextInt();
		System.out.println(ts.higher(x));
	}

	static final Random random=new Random();
	static final int mod=1_000_000_007;

	static void ruffleSort(int[] a) {
		int n=a.length;//shuffle, then sort
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	static long add(long a, long b) {
		return (a+b)%mod;
	}
	static long sub(long a, long b) {
		return ((a-b)%mod+mod)%mod;
	}
	static long mul(long a, long b) {
		return (a*b)%mod;
	}
	static long exp(long base, long exp) {
		if (exp==0) return 1;
		long half=exp(base, exp/2);
		if (exp%2==0) return mul(half, half);
		return mul(half, mul(half, base));
	}
	static long[] factorials=new long[2_000_001];
	static long[] invFactorials=new long[2_000_001];
	static void precompFacts() {
		factorials[0]=invFactorials[0]=1;
		for (int i=1; i<factorials.length; i++) factorials[i]=mul(factorials[i-1], i);
		invFactorials[factorials.length-1]=exp(factorials[factorials.length-1], mod-2);
		for (int i=invFactorials.length-2; i>=0; i--)
			invFactorials[i]=mul(invFactorials[i+1], i+1);
	}

	static long nCk(int n, int k) {
		return mul(factorials[n], mul(invFactorials[k], invFactorials[n-k]));
	}

	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

}


import java.io.*; import java.util.*;public class cf {public static void main(String [] args) throws IOException{BufferedReader br = new BufferedReader(new InputStreamReader(System.in));int r = Integer.parseInt(br.readLine())/100, i=0;int[] t = {12, 14, 16, 19, 21, 23, 24, 26, 30};while(r>=t[i]&&i<10) i++;System.out.print(t[i]*100);}}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.TreeSet;
public class Main {
 	public static void main(String arg[]) throws IOException {
 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
 		int r = Integer.parseInt(br.readLine());
 		int[] arr = {1200, 1400, 1600, 1900, 2100, 2300, 2400, 2600, 3000};
 		for(int i = 0; i < arr.length; i++) {
 			if(r < arr[i]) {
 				System.out.println(arr[i]);
 				break;
 			}
 		}
 	}
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class B {
	FastScanner in;
	PrintWriter out;
	boolean systemIO = true;

	public class DSU {
		int[] sz;
		int[] p;

		public DSU(int n) {
			sz = new int[n];
			p = new int[n];
			for (int i = 0; i < p.length; i++) {
				p[i] = i;
				sz[i] = 1;
			}
		}

		public int get(int x) {
			if (x == p[x]) {
				return x;
			}
			int par = get(p[x]);
			p[x] = par;
			return par;
		}

		public boolean unite(int a, int b) {
			int pa = get(a);
			int pb = get(b);
			if (pa == pb) {
				return false;
			}
			if (sz[pa] < sz[pb]) {
				p[pa] = pb;
				sz[pb] += sz[pa];
			} else {
				p[pb] = pa;
				sz[pa] += sz[pb];
			}
			return true;
		}
	}

	public class SegmentTreeAdd {
		int pow;
		long[] max;
		long[] delta;
		boolean[] flag;

		public SegmentTreeAdd(long[] a) {
			pow = 1;
			while (pow < a.length) {
				pow *= 2;
			}
			flag = new boolean[2 * pow];
			max = new long[2 * pow];
			delta = new long[2 * pow];
			for (int i = 0; i < max.length; i++) {
				max[i] = Long.MIN_VALUE / 2;
			}
			for (int i = 0; i < a.length; i++) {
				max[pow + i] = a[i];
			}
			for (int i = pow - 1; i > 0; i--) {
				max[i] = f(max[2 * i], max[2 * i + 1]);
			}
		}

		public long get(int v, int tl, int tr, int l, int r) {
			push(v, tl, tr);
			if (l > r) {
				return Long.MIN_VALUE / 2;
			}
			if (l == tl && r == tr) {
				return max[v];
			}
			int tm = (tl + tr) / 2;
			return f(get(2 * v, tl, tm, l, Math.min(r, tm)), get(2 * v + 1, tm + 1, tr, Math.max(l, tm + 1), r));
		}

		public void set(int v, int tl, int tr, int l, int r, long x) {
			push(v, tl, tr);
			if (l > tr || r < tl) {
				return;
			}
			if (l <= tl && r >= tr) {
				delta[v] += x;
				flag[v] = true;
				push(v, tl, tr);
				return;
			}
			int tm = (tl + tr) / 2;
			set(2 * v, tl, tm, l, r, x);
			set(2 * v + 1, tm + 1, tr, l, r, x);
			max[v] = f(max[2 * v], max[2 * v + 1]);
		}

		public void push(int v, int tl, int tr) {
			if (flag[v]) {
				if (v < pow) {
					flag[2 * v] = true;
					flag[2 * v + 1] = true;
					delta[2 * v] += delta[v];
					delta[2 * v + 1] += delta[v];
				}
				flag[v] = false;
				max[v] += delta[v];
				delta[v] = 0;
			}
		}

		public long f(long a, long b) {
			return Math.max(a, b);
		}
	}

	public class SegmentTreeSet {
		int pow;
		int[] sum;
		int[] delta;
		boolean[] flag;

		public SegmentTreeSet(int[] a) {
			pow = 1;
			while (pow < a.length) {
				pow *= 2;
			}
			flag = new boolean[2 * pow];
			sum = new int[2 * pow];
			delta = new int[2 * pow];
			for (int i = 0; i < a.length; i++) {
				sum[pow + i] = a[i];
			}
			for (int i = pow - 1; i > 0; i--) {
				sum[i] = f(sum[2 * i], sum[2 * i + 1]);
			}
		}

		public int get(int v, int tl, int tr, int l, int r) {
			push(v, tl, tr);
			if (l > r) {
				return 0;
			}
			if (l == tl && r == tr) {
				return sum[v];
			}
			int tm = (tl + tr) / 2;
			return f(get(2 * v, tl, tm, l, Math.min(r, tm)), get(2 * v + 1, tm + 1, tr, Math.max(l, tm + 1), r));
		}

		public void set(int v, int tl, int tr, int l, int r, int x) {
			push(v, tl, tr);
			if (l > tr || r < tl) {
				return;
			}
			if (l <= tl && r >= tr) {
				delta[v] = x;
				flag[v] = true;
				push(v, tl, tr);
				return;
			}
			int tm = (tl + tr) / 2;
			set(2 * v, tl, tm, l, r, x);
			set(2 * v + 1, tm + 1, tr, l, r, x);
			sum[v] = f(sum[2 * v], sum[2 * v + 1]);
		}

		public void push(int v, int tl, int tr) {
			if (flag[v]) {
				if (v < pow) {
					flag[2 * v] = true;
					flag[2 * v + 1] = true;
					delta[2 * v] = delta[v];
					delta[2 * v + 1] = delta[v];
				}
				flag[v] = false;
				sum[v] = delta[v] * (tr - tl + 1);
			}
		}

		public int f(int a, int b) {
			return a + b;
		}
	}

	public class Pair implements Comparable<Pair> {
		int x;
		int y;

		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		public Pair clone() {
			return new Pair(x, y);
		}

		public String toString() {
			return x + " " + y;
		}

		@Override
		public int compareTo(Pair o) {
			if (x > o.x) {
				return 1;
			}
			if (x < o.x) {
				return -1;
			}
			if (y > o.y) {
				return 1;
			}
			if (y < o.y) {
				return -1;
			}
			return 0;
		}
	}

	long mod = 1000000007;
	Random random = new Random();

	public void shuffle(Pair[] a) {
		for (int i = 0; i < a.length; i++) {
			int x = random.nextInt(i + 1);
			Pair t = a[x];
			a[x] = a[i];
			a[i] = t;
		}
	}

	public void sort(int[][] a) {
		for (int i = 0; i < a.length; i++) {
			Arrays.sort(a[i]);
		}
	}

	public void add(Map<Long, Integer> map, long l) {
		if (map.containsKey(l)) {
			map.put(l, map.get(l) + 1);
		} else {
			map.put(l, 1);
		}
	}

	public void remove(Map<Integer, Integer> map, Integer s) {
		if (map.get(s) > 1) {
			map.put(s, map.get(s) - 1);
		} else {
			map.remove(s);
		}
	}

	long max = Long.MAX_VALUE / 2;
	double eps = 1e-10;

	public int signum(double x) {
		if (x > eps) {
			return 1;
		}
		if (x < -eps) {
			return -1;
		}
		return 0;
	}

	public long abs(long x) {
		return x < 0 ? -x : x;
	}

	public long min(long x, long y) {
		return x < y ? x : y;
	}

	public long max(long x, long y) {
		return x > y ? x : y;
	}

	public long gcd(long x, long y) {
		while (y > 0) {
			long c = y;
			y = x % y;
			x = c;
		}
		return x;
	}

	public final Vector ZERO = new Vector(0, 0);

	// public class Vector implements Comparable<Vector> {
	// long x;
	// long y;
	// int type;
	// int number;
	//
	// public Vector() {
	// x = 0;
	// y = 0;
	// }
	//
	// public Vector(long x, long y, int type, int number) {
	// this.x = x;
	// this.y = y;
	// this.type = type;
	// this.number = number;
	// }
	//
	// public Vector(long x, long y) {
	//
	// }
	//
	// public Vector(Point begin, Point end) {
	// this(end.x - begin.x, end.y - begin.y);
	// }
	//
	// public void orient() {
	// if (x < 0) {
	// x = -x;
	// y = -y;
	// }
	// if (x == 0 && y < 0) {
	// y = -y;
	// }
	// }
	//
	// public void normalize() {
	// long gcd = gcd(abs(x), abs(y));
	// x /= gcd;
	// y /= gcd;
	// }
	//
	// public String toString() {
	// return x + " " + y;
	// }
	//
	// public boolean equals(Vector v) {
	// return x == v.x && y == v.y;
	// }
	//
	// public boolean collinear(Vector v) {
	// return cp(this, v) == 0;
	// }
	//
	// public boolean orthogonal(Vector v) {
	// return dp(this, v) == 0;
	// }
	//
	// public Vector ort(Vector v) {
	// return new Vector(-y, x);
	// }
	//
	// public Vector add(Vector v) {
	// return new Vector(x + v.x, y + v.y);
	// }
	//
	// public Vector multiply(long c) {
	// return new Vector(c * x, c * y);
	// }
	//
	// public int quater() {
	// if (x > 0 && y >= 0) {
	// return 1;
	// }
	// if (x <= 0 && y > 0) {
	// return 2;
	// }
	// if (x < 0) {
	// return 3;
	// }
	// return 0;
	// }
	//
	// public long len2() {
	// return x * x + y * y;
	// }
	//
	// @Override
	// public int compareTo(Vector o) {
	// if (quater() != o.quater()) {
	// return quater() - o.quater();
	// }
	// return signum(cp(o, this));
	// }
	// }

	// public long dp(Vector v1, Vector v2) {
	// return v1.x * v2.x + v1.y * v2.y;
	// }
	//
	// public long cp(Vector v1, Vector v2) {
	// return v1.x * v2.y - v1.y * v2.x;
	// }

	// public class Line implements Comparable<Line> {
	// Point p;
	// Vector v;
	//
	// public Line(Point p, Vector v) {
	// this.p = p;
	// this.v = v;
	// }
	//
	// public Line(Point p1, Point p2) {
	// if (p1.compareTo(p2) < 0) {
	// p = p1;
	// v = new Vector(p1, p2);
	// } else {
	// p = p2;
	// v = new Vector();
	// }
	// }
	//
	// public boolean collinear(Line l) {
	// return v.collinear(l.v);
	// }
	//
	// public boolean inLine(Point p) {
	// return hv(p) == 0;
	// }
	//
	// public boolean inSegment(Point p) {
	// if (!inLine(p)) {
	// return false;
	// }
	// Point p1 = p;
	// Point p2 = p.add(v);
	// return p1.x <= p.x && p.x <= p2.x && min(p1.y, p2.y) <= p.y && p.y <=
	// max(p1.y, p2.y);
	// }
	//
	// public boolean equalsSegment(Line l) {
	// return p.equals(l.p) && v.equals(l.v);
	// }
	//
	// public boolean equalsLine(Line l) {
	// return collinear(l) && inLine(l.p);
	// }
	//
	// public long hv(Point p) {
	// Vector v1 = new Vector(this.p, p);
	// return cp(v, v1);
	// }
	//
	// public double h(Point p) {
	// Vector v1 = new Vector(this.p, p);
	// return cp(v, v1) / Math.sqrt(v.len2());
	// }
	//
	// public long[] intersectLines(Line l) {
	// if (collinear(l)) {
	// return null;
	// }
	// long[] ans = new long[4];
	//
	// return ans;
	// }
	//
	// public long[] intersectSegment(Line l) {
	// long[] ans = intersectLines(l);
	// if (ans == null) {
	// return null;
	// }
	// Point p1 = p;
	// Point p2 = p.add(v);
	// boolean f1 = p1.x * ans[1] <= ans[0] && ans[0] <= p2.x * ans[1] && min(p1.y,
	// p2.y) * ans[3] <= ans[2]
	// && ans[2] <= max(p1.y, p2.y) * ans[3];
	// p1 = l.p;
	// p2 = l.p.add(v);
	// boolean f2 = p1.x * ans[1] <= ans[0] && ans[0] <= p2.x * ans[1] && min(p1.y,
	// p2.y) * ans[3] <= ans[2]
	// && ans[2] <= max(p1.y, p2.y) * ans[3];
	// if (!f1 || !f2) {
	// return null;
	// }
	// return ans;
	// }
	//
	// @Override
	// public int compareTo(Line o) {
	// return v.compareTo(o.v);
	// }
	// }

	public class Rect {
		long x1;
		long x2;
		long y1;
		long y2;
		int number;

		public Rect(long x1, long x2, long y1, long y2, int number) {
			this.x1 = x1;
			this.x2 = x2;
			this.y1 = y1;
			this.y2 = y2;
			this.number = number;
		}
	}

	public static class Fenvik {
		int[] t;

		public Fenvik(int n) {
			t = new int[n];
		}

		public void add(int x, int delta) {
			for (int i = x; i < t.length; i = (i | (i + 1))) {
				t[i] += delta;
			}
		}

		private int sum(int r) {
			int ans = 0;
			int x = r;
			while (x >= 0) {
				ans += t[x];
				x = (x & (x + 1)) - 1;
			}
			return ans;
		}

		public int sum(int l, int r) {
			return sum(r) - sum(l - 1);
		}
	}

	public class SegmentTreeMaxSum {
		int pow;
		int[] sum;
		int[] maxPrefSum;
		int[] maxSufSum;
		int[] maxSum;

		public SegmentTreeMaxSum(int[] a) {
			pow = 1;
			while (pow < a.length) {
				pow *= 2;
			}
			sum = new int[2 * pow];
			maxPrefSum = new int[2 * pow];
			maxSum = new int[2 * pow];
			maxSufSum = new int[2 * pow];
			for (int i = 0; i < a.length; i++) {
				sum[pow + i] = a[i];
				maxSum[pow + i] = Math.max(a[i], 0);
				maxPrefSum[pow + i] = maxSum[pow + i];
				maxSufSum[pow + i] = maxSum[pow + i];
			}
			for (int i = pow - 1; i > 0; i--) {
				update(i);
			}
		}

		public int[] get(int v, int tl, int tr, int l, int r) {
			if (r <= tl || l >= tr) {
				int[] ans = { 0, 0, 0, 0 };
				return ans;
			}
			if (l <= tl && r >= tr) {
				int[] ans = { maxPrefSum[v], maxSum[v], maxSufSum[v], sum[v] };
				return ans;
			}
			int tm = (tl + tr) / 2;
			int[] left = get(2 * v, tl, tm, l, r);
			int[] right = get(2 * v + 1, tm, tr, l, r);
			int[] ans = { Math.max(left[0], right[0] + left[3]),
					Math.max(left[1], Math.max(right[1], left[2] + right[0])), Math.max(right[2], left[2] + right[3]),
					left[3] + right[3] };
			return ans;
		}

		public void set(int v, int tl, int tr, int x, int value) {
			if (v >= pow) {
				sum[v] = value;
				maxSum[v] = Math.max(value, 0);
				maxPrefSum[v] = maxSum[v];
				maxSufSum[v] = maxSum[v];
				return;
			}
			int tm = (tl + tr) / 2;
			if (x < tm) {
				set(2 * v, tl, tm, x, value);
			} else {
				set(2 * v + 1, tm, tr, x, value);
			}
			update(v);
		}

		public void update(int i) {
			sum[i] = f(sum[2 * i], sum[2 * i + 1]);
			maxSum[i] = Math.max(maxSum[2 * i], Math.max(maxSum[2 * i + 1], maxSufSum[2 * i] + maxPrefSum[2 * i + 1]));
			maxPrefSum[i] = Math.max(maxPrefSum[2 * i], maxPrefSum[2 * i + 1] + sum[2 * i]);
			maxSufSum[i] = Math.max(maxSufSum[2 * i + 1], maxSufSum[2 * i] + sum[2 * i + 1]);
		}

		public int f(int a, int b) {
			return a + b;
		}
	}

	public class Point implements Comparable<Point> {
		double x;
		double y;

		public Point() {
			x = 0;
			y = 0;
		}

		public Point(double x, double y) {
			this.x = x;
			this.y = y;
		}

		public String toString() {
			return x + " " + y;
		}

		public boolean equals(Point p) {
			return x == p.x && y == p.y;
		}

		public double dist2() {
			return x * x + y * y;
		}

		public Point add(Point v) {
			return new Point(x + v.x, y + v.y);
		}

		@Override
		public int compareTo(Point o) {
			int z = signum(x + y - o.x - o.y);
			if (z != 0) {
				return z;
			}
			return signum(x - o.x) != 0 ? signum(x - o.x) : signum(y - o.y);
		}
	}

	public class Circle implements Comparable<Circle> {
		Point p;
		int r;

		public Circle(Point p, int r) {
			this.p = p;
			this.r = r;
		}

		public Point angle() {
			double z = r / sq2;
			z -= z % 1e-5;
			return new Point(p.x - z, p.y - z);
		}

		public boolean inside(Point p) {
			return hypot2(p.x - this.p.x, p.y - this.p.y) <= sq(r);
		}

		@Override
		public int compareTo(Circle o) {
			Point a = angle();
			Point oa = o.angle();
			int z = signum(a.x + a.y - oa.x - oa.y);
			if (z != 0) {
				return z;
			}
			return signum(a.y - oa.y);
		}

	}

	public class Fraction implements Comparable<Fraction> {
		long x;
		long y;

		public Fraction(long x, long y, boolean needNorm) {
			this.x = x;
			this.y = y;
			if (y < 0) {
				this.x *= -1;
				this.y *= -1;
			}
			if (needNorm) {
				long gcd = gcd(this.x, this.y);
				this.x /= gcd;
				this.y /= gcd;
			}
		}

		public Fraction clone() {
			return new Fraction(x, y, false);
		}

		public String toString() {
			return x + "/" + y;
		}

		@Override
		public int compareTo(Fraction o) {
			long res = x * o.y - y * o.x;
			if (res > 0) {
				return 1;
			}
			if (res < 0) {
				return -1;
			}
			return 0;
		}
	}

	public double sq(double x) {
		return x * x;
	}

	public long sq(long x) {
		return x * x;
	}

	public double hypot2(double x, double y) {
		return sq(x) + sq(y);
	}

	public long hypot2(long x, long y) {
		return sq(x) + sq(y);
	}

	public boolean kuhn(int v, int[][] edge, boolean[] used, int[] mt) {
		used[v] = true;
		for (int u : edge[v]) {
			if (mt[u] < 0 || (!used[mt[u]] && kuhn(mt[u], edge, used, mt))) {
				mt[u] = v;
				return true;
			}
		}
		return false;
	}

	public int matching(int[][] edge) {
		int n = edge.length;
		int[] mt = new int[n];
		Arrays.fill(mt, -1);
		boolean[] used = new boolean[n];
		int ans = 0;
		for (int i = 0; i < n; i++) {
			if (!used[i] && kuhn(i, edge, used, mt)) {
				Arrays.fill(used, false);
				ans++;
			}
		}
		return ans;
	}

	double sq2 = Math.sqrt(2);

	int small = 20;

	public class MyStack {
		int[] st;
		int sz;

		public MyStack(int n) {
			this.st = new int[n];
			sz = 0;
		}

		public boolean isEmpty() {
			return sz == 0;
		}

		public int peek() {
			return st[sz - 1];
		}

		public int pop() {
			sz--;
			return st[sz];
		}

		public void clear() {
			sz = 0;
		}

		public void add(int x) {
			st[sz++] = x;
		}

		public int get(int x) {
			return st[x];
		}
	}

	public int[][] readGraph(int n, int m) {
		int[][] to = new int[n][];
		int[] sz = new int[n];
		int[] x = new int[m];
		int[] y = new int[m];
		for (int i = 0; i < m; i++) {
			x[i] = in.nextInt() - 1;
			y[i] = in.nextInt() - 1;
			sz[x[i]]++;
			sz[y[i]]++;
		}
		for (int i = 0; i < to.length; i++) {
			to[i] = new int[sz[i]];
			sz[i] = 0;
		}
		for (int i = 0; i < x.length; i++) {
			to[x[i]][sz[x[i]]++] = y[i];
			to[y[i]][sz[y[i]]++] = x[i];
		}
		return to;
	}

	public class Pol {
		double[] coeff;

		public Pol(double[] coeff) {
			this.coeff = coeff;
		}

		public Pol mult(Pol p) {
			double[] ans = new double[coeff.length + p.coeff.length - 1];
			for (int i = 0; i < ans.length; i++) {
				for (int j = Math.max(0, i - p.coeff.length + 1); j < coeff.length && j <= i; j++) {
					ans[i] += coeff[j] * p.coeff[i - j];
				}
			}
			return new Pol(ans);
		}

		public String toString() {
			String ans = "";
			for (int i = 0; i < coeff.length; i++) {
				ans += coeff[i] + " ";
			}
			return ans;
		}

		public double value(double x) {
			double ans = 0;
			double p = 1;
			for (int i = 0; i < coeff.length; i++) {
				ans += coeff[i] * p;
				p *= x;
			}
			return ans;
		}

		public double integrate(double r) {
			Pol p = new Pol(new double[coeff.length + 1]);
			for (int i = 0; i < coeff.length; i++) {
				p.coeff[i + 1] = coeff[i] / fact[i + 1];
			}
			return p.value(r);
		}

		public double integrate(double l, double r) {
			return integrate(r) - integrate(l);
		}
	}

	double[] fact = new double[100];

	public class SparseTable {
		int pow;
		int[] lessPow;
		int[][] min;

		public SparseTable(int[] a) {
			pow = 0;
			while ((1 << pow) <= a.length) {
				pow++;
			}
			min = new int[pow][a.length];
			for (int i = 0; i < a.length; i++) {
				min[0][i] = a[i];
			}
			for (int i = 1; i < pow; i++) {
				for (int j = 0; j < a.length; j++) {
					min[i][j] = min[i - 1][j];
					if (j + (1 << (i - 1)) < a.length) {
						min[i][j] = func(min[i][j], min[i - 1][j + (1 << (i - 1))]);
					}
				}
			}
			lessPow = new int[a.length + 1];
			for (int i = 1; i < lessPow.length; i++) {
				if (i < (1 << (lessPow[i - 1]) + 1)) {
					lessPow[i] = lessPow[i - 1];
				} else {
					lessPow[i] = lessPow[i - 1] + 1;
				}
			}
		}

		public int get(int l, int r) { // [l, r)
			int p = lessPow[r - l];
			return func(min[p][l], min[p][r - (1 << p)]);
		}

		public int func(int a, int b) {
			if (a < b) {
				return a;
			}
			return b;
		}
	}

	public double check(int n, ArrayList<Integer> masks) {
		int good = 0;
		for (int colorMask = 0; colorMask < (1 << n); ++colorMask) {
			int best = 2 << n;
			int cnt = 0;
			for (int curMask : masks) {
				int curScore = 0;
				for (int i = 0; i < n; ++i) {
					if (((curMask >> i) & 1) == 1) {
						if (((colorMask >> i) & 1) == 0) {
							curScore += 1;
						} else {
							curScore += 2;
						}
					}
				}

				if (curScore < best) {
					best = curScore;
					cnt = 1;
				} else if (curScore == best) {
					++cnt;
				}
			}

			if (cnt == 1) {
				++good;
			}
		}

		return (double) good / (double) (1 << n);
	}

	public int builtin_popcount(int x) {
		int ans = 0;
		for (int i = 0; i < 14; i++) {
			if (((x >> i) & 1) > 0) {
				ans++;
			}
		}
		return ans;
	}

	public int number(int[] x) {
		int ans = 0;
		for (int i = 0; i < x.length; i++) {
			ans *= 3;
			ans += x[i];
		}
		return ans;
	}

	public int[] rotate(int[] x) {
		int[] ans = { x[2], x[0], x[3], x[1] };
		return ans;
	}

	int MAX = 100000;

	boolean[] b = new boolean[MAX];
	int[][] max0 = new int[MAX][2];
	int[][] max1 = new int[MAX][2];
	int[][] max2 = new int[MAX][2];
	int[] index0 = new int[MAX];
	int[] index1 = new int[MAX];
	int[] p = new int[MAX];

	public int place(String s) {
		if (s.charAt(s.length() - 1) == '1') {
			return 1;
		}
		int number = 16;
		boolean w = true;
		boolean a = true;
		for (int i = 0; i < s.length(); i++) {
			if (number == 1) {
				return 2;
			}
			if (s.charAt(i) == '1') {
				if (w) {
					number /= 2;
				} else {
					if (a) {
						a = false;
					} else {
						number /= 2;
						a = true;
					}
				}
			} else {
				if (w) {
					if (number == 16) {
						w = false;
						number /= 2;
					} else {
						w = false;
						a = false;
					}
				} else {
					if (number == 8) {
						if (a) {
							return 13;
						} else {
							return 9;
						}
					} else if (number == 4) {
						if (a) {
							return 7;
						} else {
							return 5;
						}
					} else if (a) {
						return 4;
					} else {
						return 3;
					}
				}
			}
		}
		return 0;
	}

	public class P implements Comparable<P> {
		Integer x;
		String s;

		public P(Integer x, String s) {
			this.x = x;
			this.s = s;
		}

		@Override
		public String toString() {
			return x + " " + s;
		}

		@Override
		public int compareTo(P o) {
			if (x != o.x) {
				return x - o.x;
			}
			return s.compareTo(o.s);
		}
	}

	public BigInteger prod(int l, int r) {
		if (l + 1 == r) {
			return BigInteger.valueOf(l);
		}
		int m = (l + r) >> 1;
		return prod(l, m).multiply(prod(m, r));
	}

	public class Frac {
		BigInteger p;
		BigInteger q;

		public Frac(BigInteger p, BigInteger q) {
			BigInteger gcd = p.gcd(q);
			this.p = p.divide(gcd);
			this.q = q.divide(gcd);
		}

		public String toString() {
			return p + "\n" + q;
		}

		public Frac(long p, long q) {
			this(BigInteger.valueOf(p), BigInteger.valueOf(q));
		}

		public Frac mul(Frac o) {
			return new Frac(p.multiply(o.p), q.multiply(o.q));
		}

		public Frac sum(Frac o) {
			return new Frac(p.multiply(o.q).add(q.multiply(o.p)), q.multiply(o.q));
		}

		public Frac diff(Frac o) {
			return new Frac(p.multiply(o.q).subtract(q.multiply(o.p)), q.multiply(o.q));
		}
	}

	public int[] transform(int[] x, int k, int step) {
		int n = x.length;
		int[] a = new int[n];
		int[][] prefsum = new int[n][];
		int[] elements = new int[n];
		int[] start = new int[n];
		int[] id = new int[n];
		for (int i = 0; i < n; i++) {
			if (elements[i] > 0) {
				continue;
			}
			int cur = i;
			do {
				elements[i]++;
				cur += step;
				cur %= n;
			} while (cur != i);
			for (int j = 0; j < elements[i]; j++) {
				start[cur] = i;
				id[cur] = j;
				elements[cur] = elements[i];
				cur += step;
				cur %= n;
			}
			prefsum[i] = new int[3 * elements[i] + 1];
			for (int j = 0; j < 3 * elements[i]; j++) {
				prefsum[i][j + 1] = prefsum[i][j] ^ x[cur];
				cur += step;
				cur %= n;
			}
		}
		for (int i = 0; i < x.length; i++) {
			int curlen = k % (2 * elements[i]);
			a[i] = prefsum[start[i]][id[i] + curlen] ^ prefsum[start[i]][id[i]];
		}
		return a;
	}

	public void solve() {
		int r = in.nextInt();
		TreeSet<Integer> set = new TreeSet<>();
		set.add(1200);
		set.add(1400);
		set.add(1600);
		set.add(1900);
		set.add(2100);
		set.add(2300);
		set.add(2400);
		set.add(2600);
		set.add(3000);
		out.println(set.higher(r));
	}

	public void add(HashMap<Integer, Integer> map, int x) {
		if (map.containsKey(x)) {
			map.put(x, map.get(x) + 1);
		} else {
			map.put(x, 1);
		}
	}

	public void run() {
		try {
			if (systemIO) {
				in = new FastScanner(System.in);
				out = new PrintWriter(System.out);
			} else {
				in = new FastScanner(new File("input.txt"));
				out = new PrintWriter(new File("output.txt"));
			}
			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

	}

	// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
	public static void main(String[] arg) {
		new B().run();
	}
}


/*
I am dead inside
Do you like NCT, sKz, BTS?
5 4 3 2 1 Moonwalk
Imma knock it down like domino
Is this what you want? Is this what you want?
Let's ttalkbocky about that
 */
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
import java.math.*;

public class lolB
{
    public static void main(String omkar[]) throws Exception
    {
        BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(infile.readLine());
        int X = Integer.parseInt(st.nextToken());
        if(X < 1200)
            System.out.println(1200);
        else if(X < 1400)
            System.out.println(1400);
        else if(X < 1600)
            System.out.println(1600);
        else if(X < 1900)
            System.out.println(1900);
        else if(X < 2100)
            System.out.println(2100);
        else if(X < 2300)
            System.out.println(2300);
        else if(X < 2400)
            System.out.println(2400);
        else if(X < 2600)
            System.out.println(2600);
        else
            System.out.println(3000);
    }
    public static int[] readArr(int N, BufferedReader infile, StringTokenizer st) throws Exception
    {
        int[] arr = new int[N];
        st = new StringTokenizer(infile.readLine());
        for(int i=0; i < N; i++)
            arr[i] = Integer.parseInt(st.nextToken());
        return arr;
    }
}


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

public class Main implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(null, new Main(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    long[] readLongArray(int n) throws IOException{
        long[] array = new long[n];
        for (int i = 0; i < n; i++) {
            array[i] = readLong();
        }
        return array;
    }

    int[] readIntArray(int n) throws IOException{
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = readInt();
        }
        return array;
    }

    static final Random random=new Random();

    static void ruffleSort(int[] a) {
        int n=a.length;//shuffle, then sort
        for (int i=0; i<n; i++) {
            int oi=random.nextInt(n), temp=a[oi];
            a[oi]=a[i]; a[i]=temp;
        }
        Arrays.sort(a);
    }

    static void ruffleSort(long[] a) {
        int n=a.length;//shuffle, then sort
        for (int i=0; i<n; i++) {
            int oi = random.nextInt(n);
            long temp = a[oi];
            a[oi]=a[i]; a[i]=temp;
        }
        Arrays.sort(a);
    }

    void solve() throws IOException {
        int n = readInt();
        if (n >= 2600) {
            out.println(3000);
        } else if (n >= 2400) {
            out.println(2600);
        } else if (n >= 2300) {
            out.println(2400);
        } else if (n >= 2100) {
            out.println(2300);
        } else if (n >= 1900) {
            out.println(2100);
        } else if (n >= 1600) {
            out.println(1900);
        } else if (n>= 1400) {
            out.println(1600);
        } else if (n >= 1200) {
            out.println(1400);
        } else {
            out.println(1200);
        }
    }

}


import java.util.Scanner;

public class B {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        if (n < 1200)
        {
            System.out.println(1200);
        }
        else if (n < 1400)
        {
            System.out.println(1400);
        }
        else if (n < 1600)
        {
            System.out.println(1600);
        }
        else if (n < 1900)
        {
            System.out.println(1900);
        }
        else if(n < 2100)
        {
            System.out.println(2100);
        }
        else if (n < 2300)
        {
            System.out.println(2300);
        }
        else if(n<2400)
        {
            System.out.println(2400);
        }
        else if (n < 2600)
        {
            System.out.println(2600);
        }
        else
        {
            System.out.println(3000);
        }
    }
}


import java.util.*;
import java.lang.*;
public class Main{
    public static void main(String args[]){
    Scanner inp=new Scanner(System.in);
    int arr[]={1200,1400,1600,1900,2100,2300,2400,2600,3000};
    int t=inp.nextInt();
    int length=arr.length;
    for(int i=0;i<length;i++){
    if(t<arr[i]){
    System.out.println(arr[i]);
    System.exit(0);
    }
    }
    }
    }


import java.util.*;

public class Problem2 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int[] values = {1200, 1400, 1600, 1900, 2100, 2300, 2400, 2600, 3000 };
        for (int v: values) {
            if (x < v) {
                System.out.println(v);
                break;
            }
        }
        sc.close();
	}

}


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

public class Main
{
    static long mod = (int)1e9+7;
    // static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
	public static void main (String[] args) throws java.lang.Exception
	{
		FastReader sc =new FastReader();

	   // int t=sc.nextInt();

	    int t=1;

	    while(t-->0)
	    {
	        int n = sc.nextInt();
	        TreeSet<Integer> set = new TreeSet<>();
	        set.add(3000);
	        set.add(2600);
	        set.add(2400);
	        set.add(2300);
	        set.add(2100);
	        set.add(1900);
	        set.add(1600);
	        set.add(1400);
	        set.add(1200);
	        System.out.println(set.higher(n));
	    }

	}

	static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() { return Integer.parseInt(next()); }

        long nextLong() { return Long.parseLong(next()); }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        float nextFloat()
        {
            return Float.parseFloat(next());
        }

        String nextLine()
        {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}

		long[] readArrayLong(int n) {
			long[] a=new long[n];
			for (int i=0; i<n; i++) a[i]=nextLong();
			return a;
		}

    }

    public static int[] radixSort2(int[] a)
	{
		int n = a.length;
		int[] c0 = new int[0x101];
		int[] c1 = new int[0x101];
		int[] c2 = new int[0x101];
		int[] c3 = new int[0x101];
		for(int v : a) {
			c0[(v&0xff)+1]++;
			c1[(v>>>8&0xff)+1]++;
			c2[(v>>>16&0xff)+1]++;
			c3[(v>>>24^0x80)+1]++;
		}
		for(int i = 0;i < 0xff;i++) {
			c0[i+1] += c0[i];
			c1[i+1] += c1[i];
			c2[i+1] += c2[i];
			c3[i+1] += c3[i];
		}
		int[] t = new int[n];
		for(int v : a)t[c0[v&0xff]++] = v;
		for(int v : t)a[c1[v>>>8&0xff]++] = v;
		for(int v : a)t[c2[v>>>16&0xff]++] = v;
		for(int v : t)a[c3[v>>>24^0x80]++] = v;
		return a;
	}

	static void reverse_sorted(int[] arr)
	{
	    ArrayList<Integer> list = new ArrayList<>();
	    for(int i=0;i<arr.length;i++)
	    {
	        list.add(arr[i]);
	    }
	    Collections.sort(list , Collections.reverseOrder());
	    for(int i=0;i<arr.length;i++)
	    {
	        arr[i] = list.get(i);
	    }
	}

	static int LowerBound(int a[], int x) { // x is the target value or key
        int l=-1,r=a.length;
        while(l+1<r) {
            int m=(l+r)>>>1;
            if(a[m]>=x) r=m;
            else l=m;
        }
        return r;
    }

    static int UpperBound(ArrayList<Integer> list, int x) {// x is the key or target value
        int l=-1,r=list.size();
        while(l+1<r) {
            int m=(l+r)>>>1;
            if(list.get(m)<=x) l=m;
            else r=m;
        }
        return l+1;
    }

    public static HashMap<Integer, Integer> sortByValue(HashMap<Integer, Integer> hm)
    {
        // Create a list from elements of HashMap
        List<Map.Entry<Integer, Integer> > list =
               new LinkedList<Map.Entry<Integer, Integer> >(hm.entrySet());

        // Sort the list
        Collections.sort(list, new Comparator<Map.Entry<Integer, Integer> >() {
            public int compare(Map.Entry<Integer, Integer> o1,
                               Map.Entry<Integer, Integer> o2)
            {
                return (o1.getValue()).compareTo(o2.getValue());
            }
        });

        // put data from sorted list to hashmap
        HashMap<Integer, Integer> temp = new LinkedHashMap<Integer, Integer>();
        for (Map.Entry<Integer, Integer> aa : list) {
            temp.put(aa.getKey(), aa.getValue());
        }
        return temp;
    }

    static class Queue_Pair implements Comparable<Queue_Pair> {
		int first , second;
		public Queue_Pair(int first, int second) {
			this.first=first;
			this.second=second;
		}
		public int compareTo(Queue_Pair o) {
			return Integer.compare(o.first, first);
		}
	}

    static void leftRotate(int arr[], int d, int n)
    {
        for (int i = 0; i < d; i++)
            leftRotatebyOne(arr, n);
    }

    static void leftRotatebyOne(int arr[], int n)
    {
        int i, temp;
        temp = arr[0];
        for (i = 0; i < n - 1; i++)
            arr[i] = arr[i + 1];
        arr[n-1] = temp;

    }

    static boolean isPalindrome(String str)
    {

        // Pointers pointing to the beginning
        // and the end of the string
        int i = 0, j = str.length() - 1;

        // While there are characters to compare
        while (i < j) {

            // If there is a mismatch
            if (str.charAt(i) != str.charAt(j))
                return false;

            // Increment first pointer and
            // decrement the other
            i++;
            j--;
        }

        // Given string is a palindrome
        return true;
    }

    static boolean palindrome_array(char arr[], int n)
    {
        // Initialise flag to zero.
        int flag = 0;

        // Loop till array size n/2.
        for (int i = 0; i <= n / 2 && n != 0; i++) {

            // Check if first and last element are different
            // Then set flag to 1.
            if (arr[i] != arr[n - i - 1]) {
                flag = 1;
                break;
            }
        }

        // If flag is set then print Not Palindrome
        // else print Palindrome.
        if (flag == 1)
            return false;
        else
            return true;
    }

	static boolean allElementsEqual(int[] arr,int n)
	{
	    int z=0;
	        for(int i=0;i<n-1;i++)
		    {
		        if(arr[i]==arr[i+1])
		        {
		            z++;
		        }
		    }
		    if(z==n-1)
		    {
		        return true;
		    }
		    else
		    {
		        return false;
		    }

	}

	static boolean allElementsDistinct(int[] arr,int n)
	{
	    int z=0;
	        for(int i=0;i<n-1;i++)
		    {
		        if(arr[i]!=arr[i+1])
		        {
		            z++;
		        }
		    }
		    if(z==n-1)
		    {
		        return true;
		    }
		    else
		    {
		        return false;
		    }

	}

	public static void reverse(int[] array)
    {

        // Length of the array
        int n = array.length;

        // Swaping the first half elements with last half
        // elements
        for (int i = 0; i < n / 2; i++) {

            // Storing the first half elements temporarily
            int temp = array[i];

            // Assigning the first half to the last half
            array[i] = array[n - i - 1];

            // Assigning the last half to the first half
            array[n - i - 1] = temp;
        }
    }

    public static void reverse_Long(long[] array)
    {

        // Length of the array
        int n = array.length;

        // Swaping the first half elements with last half
        // elements
        for (int i = 0; i < n / 2; i++) {

            // Storing the first half elements temporarily
            long temp = array[i];

            // Assigning the first half to the last half
            array[i] = array[n - i - 1];

            // Assigning the last half to the first half
            array[n - i - 1] = temp;
        }
    }

	static boolean isSorted(int[] a)
    {
        for (int i = 0; i < a.length - 1; i++)
        {
            if (a[i] > a[i + 1]) {
                return false;
            }
        }

        return true;
    }

    static boolean isReverseSorted(int[] a)
    {
        for (int i = 0; i < a.length - 1; i++)
        {
            if (a[i] < a[i + 1]) {
                return false;
            }
        }

        return true;
    }

    static int[] rearrangeEvenAndOdd(int arr[], int n)
    {
        ArrayList<Integer> list = new ArrayList<>();

		    for(int i=0;i<n;i++)
		    {
		        if(arr[i]%2==0)
		        {
		            list.add(arr[i]);
		        }
		    }

		    for(int i=0;i<n;i++)
		    {
		        if(arr[i]%2!=0)
		        {
		            list.add(arr[i]);
		        }
		    }
		    int len = list.size();
		    int[] array = list.stream().mapToInt(i->i).toArray();
		    return array;
    }

    static long[] rearrangeEvenAndOddLong(long arr[], int n)
    {
        ArrayList<Long> list = new ArrayList<>();

		    for(int i=0;i<n;i++)
		    {
		        if(arr[i]%2==0)
		        {
		            list.add(arr[i]);
		        }
		    }

		    for(int i=0;i<n;i++)
		    {
		        if(arr[i]%2!=0)
		        {
		            list.add(arr[i]);
		        }
		    }
		    int len = list.size();
		    long[] array = list.stream().mapToLong(i->i).toArray();
		    return array;
    }

    static boolean isPrime(long n)
    {

        // Check if number is less than
        // equal to 1
        if (n <= 1)
            return false;

        // Check if number is 2
        else if (n == 2)
            return true;

        // Check if n is a multiple of 2
        else if (n % 2 == 0)
            return false;

        // If not, then just check the odds
        for (long i = 3; i <= Math.sqrt(n); i += 2)
        {
            if (n % i == 0)
                return false;
        }
        return true;
    }

    static long getSum(long n)
    {
        long sum = 0;

        while (n != 0)
        {
            sum = sum + n % 10;
            n = n/10;
        }

    return sum;
    }

    static int gcd(int a, int b)
    {
      if (b == 0)
        return a;
      return gcd(b, a % b);
    }

    static long gcdLong(long a, long b)
    {
        if (b == 0)
        return a;
      return gcdLong(b, a % b);
    }

    static void swap(int i, int j)
    {
        int temp = i;
        i = j;
        j = temp;
    }

	static int countDigit(int n)
    {
        return (int)Math.floor(Math.log10(n) + 1);
    }

}

class Pair
{
    int first;
    int second;
    Pair(int first , int second)
    {
        this.first = first;
        this.second = second;
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.BigInteger;

public class B_Mike_s_Sequence {
    static Scanner t = new Scanner(System.in);

    public static void kalingaisop() {
        int n = t.nextInt();
        if (n < 1200) {
            System.out.println(1200);
        } else if (n < 1400) {
            System.out.println(1400);
        } else if (n < 1600) {
            System.out.println(1600);
        } else if (n < 1900) {
            System.out.println(1900);
        } else if (n < 2100) {
            System.out.println(2100);
        } else if (n < 2300) {
            System.out.println(2300);
        } else if (n < 2400) {
            System.out.println(2400);
        } else if (n < 2600) {
            System.out.println(2600);
        } else {
            System.out.println(3000);
        }
    }

    public static void main(String[] args) throws java.lang.Exception {
        kalingaisop();
    }
}


import java.util.*;

public class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int r = scan.nextInt();
if(r<1200) System.out.println(1200);
	else if(r<1400) System.out.println(1400);
	else if(r<1600) System.out.println(1600);
	else if(r<1900) System.out.println(1900);
	else if(r<2100) System.out.println(2100);
	else if(r<2300) System.out.println(2300);
	else if(r<2400) System.out.println(2400);
	else if(r<2600) System.out.println(2600);
	else if(r<3000) System.out.println(3000);
}
}


import java.util.*;
public class Solution {
	public static void main(String[] args) {
		int t;
		Scanner in= new Scanner(System.in);
//		t = in.nextInt()+1;
		for(int l=0;l<1;l++) {
			int n= in.nextInt();
			if(n<1200) {
				println(1200);
			}
			else if(n < 1400) println( 1400);
		    else if(n < 1600) println(1600);
		    else if(n < 1900) println(1900);
		    else if(n < 2100) println (2100);
		    else if(n < 2300) println(2300);
		    else if(n < 2400) println(2400);
		    else if(n < 2600) println(2600);
		    else  println(3000);

		}

	}
	static void println(int n) {
		System.out.println(n);
	}
	static void println(long n) {
		System.out.print(n);
	}
	static void println(String s) {
		System.out.print(s);
	}
	static void print(int n) {
		System.out.print(n);
	}
	static void print(long n) {
		System.out.print(n);
	}
	static void print(String s) {
		System.out.print(s);
	}
}