import java.util.*;
public class Demo{
    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 if(n<3000)

        System.out.println(3000);
    }
}


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

public class Main {

	// public static int gcd(int a, int b) {
	// return b == 0 ? a : gcd(b, a % b);
	// }
	//
	// public static int lcm(int a, int b) {
	// return a * b / gcd(a, b);
	// }
	//
	// public static long pow(int number, long i) {
	// if (i == 0)
	// return 1;
	// long sum = pow(number, i / 2);
	// sum *= sum;
	// if ((i & 1) == 1)
	// sum *= number;
	// return sum;
	// }
	//
	// public static long fac(long i) {
	// if (i == 0)
	// return 1;
	// return i * fac(i - 1);
	// }
	//
	// public static long compliment(int number, int bits) {
	// return number ^ (pow(2, bits) - 1);
	// }

	public static void main(String[] args) throws IOException,
			InterruptedException {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		int r = sc.nextInt();
		int[] arr = {1200,1400,1600,1900,2100,2300,2400,2600,3000};
		for(int i = 0;i<arr.length;i++){
			if(arr[i]>r){
				pw.print(arr[i]+" ");
				break;
			}
		}
		pw.flush();
	}

	static class Pair {
		String a;
		String b;

		public Pair(String a, String b) {
			this.a = a;
			this.b = b;
		}

		public String toString() {

			return "( " + a + " " + b + " )";
		}

	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(FileReader r) {
			br = new BufferedReader(r);
		}

		public String readAllLines(BufferedReader reader) throws IOException {
			StringBuilder content = new StringBuilder();
			String line;

			while ((line = reader.readLine()) != null) {
				content.append(line);
				content.append(System.lineSeparator());
			}

			return content.toString();
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

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

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

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

		public Long[] nextLongArray(int n) throws IOException {
			Long[] a = new Long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public Integer[] nextIntegerArray(int n) throws IOException {
			Integer[] a = new Integer[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

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

	}
}


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

public class Main {

    static long startTime = System.currentTimeMillis();

    // for global initializations and methods starts here

    // global initialisations and methods end here

    static void run() {
        boolean tc = false;
        //AdityaFastIO r = new AdityaFastIO();
        FastReader r = new FastReader();

        try (OutputStream out = new BufferedOutputStream(System.out)) {

            //long startTime = System.currentTimeMillis();

            int testcases = tc ? r.ni() : 1;
            int tcCounter = 1;
            // Hold Here Sparky------------------->>>
            // Solution Starts Here

            start:
            while (testcases-- > 0) {

                int n = r.ni();
                int low = 1200;
                List<Integer> al = new ArrayList<>();
                while (low <= 3000) {
                    al.add(low);
                    if (low == 1600) low += 100;
                    low += 200;
                    if (low == 2500) low -= 100;
                    if (low == 2800) low += 200;
                }

                if (al.contains(n)) {
                    out.write((al.get((int) (lower_bound(al, n) + 1)) + " ").getBytes());
                } else {
                    out.write((al.get((int) lower_bound(al, n)) + " ").getBytes());
                }

            }
            // Solution Ends Here
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    static class AdityaFastIO {
        final private int BUFFER_SIZE = 1 << 16;
        private final DataInputStream din;
        private final byte[] buffer;
        private int bufferPointer, bytesRead;
        public BufferedReader br;
        public StringTokenizer st;

        public AdityaFastIO() {
            br = new BufferedReader(new InputStreamReader(System.in));
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public AdityaFastIO(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

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

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

        public String readLine() throws IOException {
            byte[] buf = new byte[100000001]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int ni() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg) return -ret;
            return ret;
        }

        public long nl() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg) return -ret;
            return ret;
        }

        public double nd() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (c == '.') while ((c = read()) >= '0' && c <= '9') ret += (c - '0') / (div *= 10);
            if (neg) return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null) return;
            din.close();
        }
    }

    public static void main(String[] args) throws Exception {
        run();
    }

    static int[] readIntArr(int n, AdityaFastIO r) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) arr[i] = r.ni();
        return arr;
    }

    static long[] readLongArr(int n, AdityaFastIO r) throws IOException {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++) arr[i] = r.nl();
        return arr;
    }

    static List<Integer> readIntList(int n, AdityaFastIO r) throws IOException {
        List<Integer> al = new ArrayList<>();
        for (int i = 0; i < n; i++) al.add(r.ni());
        return al;
    }

    static List<Long> readLongList(int n, AdityaFastIO r) throws IOException {
        List<Long> al = new ArrayList<>();
        for (int i = 0; i < n; i++) al.add(r.nl());
        return al;
    }

    static long mod = 998244353;

    static long modInv(long base, long e) {
        long result = 1;
        base %= mod;
        while (e > 0) {
            if ((e & 1) > 0) result = result * base % mod;
            base = base * base % mod;
            e >>= 1;
        }
        return result;
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

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

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

        int ni() {
            return Integer.parseInt(word());
        }

        long nl() {
            return Long.parseLong(word());
        }

        double nd() {
            return Double.parseDouble(word());
        }
    }

    static int MOD = (int) (1e9 + 7);

    static long powerLL(long x, long n) {
        long result = 1;
        while (n > 0) {
            if (n % 2 == 1) result = result * x % MOD;
            n = n / 2;
            x = x * x % MOD;
        }
        return result;
    }

    static long powerStrings(int i1, int i2) {
        String sa = String.valueOf(i1);
        String sb = String.valueOf(i2);
        long a = 0, b = 0;
        for (int i = 0; i < sa.length(); i++) a = (a * 10 + (sa.charAt(i) - '0')) % MOD;
        for (int i = 0; i < sb.length(); i++) b = (b * 10 + (sb.charAt(i) - '0')) % (MOD - 1);
        return powerLL(a, b);
    }

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

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

    static long lower_bound(List<Integer> arr, int x) {
        int l = -1, r = arr.size();
        while (l + 1 < r) {
            int m = (l + r) >>> 1;
            if (arr.get(m) >= x) r = m;
            else l = m;
        }
        return r;
    }

    static int upper_bound(int[] arr, int x) {
        int l = -1, r = arr.length;
        while (l + 1 < r) {
            int m = (l + r) >>> 1;
            if (arr[m] <= x) l = m;
            else r = m;
        }
        return l + 1;
    }

    static void addEdge(ArrayList<ArrayList<Integer>> graph, int edge1, int edge2) {
        graph.get(edge1).add(edge2);
        graph.get(edge2).add(edge1);
    }

    public static class Pair implements Comparable<Pair> {
        int first;
        int second;

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

        public String toString() {
            return "(" + first + "," + second + ")";
        }

        public int compareTo(Pair o) {
            // TODO Auto-generated method stub
            if (this.first != o.first)
                return (int) (this.first - o.first);
            else return (int) (this.second - o.second);
        }
    }

    public static class PairC<X, Y> implements Comparable<PairC> {
        X first;
        Y second;

        public PairC(X first, Y second) {
            this.first = first;
            this.second = second;
        }

        public String toString() {
            return "(" + first + "," + second + ")";
        }

        public int compareTo(PairC o) {
            // TODO Auto-generated method stub
            return o.compareTo((PairC) first);
        }
    }

    static boolean isCollectionsSorted(List<Long> list) {
        if (list.size() == 0 || list.size() == 1) return true;
        for (int i = 1; i < list.size(); i++) if (list.get(i) <= list.get(i - 1)) return false;
        return true;
    }

    static boolean isCollectionsSortedReverseOrder(List<Long> list) {
        if (list.size() == 0 || list.size() == 1) return true;
        for (int i = 1; i < list.size(); i++) if (list.get(i) >= list.get(i - 1)) return false;
        return true;
    }

}


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

public class D {

	static boolean check(int i, int j, int n, int m,int arr[][]) {
		if(i<0 || i>=n || j<0 || j>=m)
			return false;
		if(arr[i][j]!=1)
			return false;
		return true;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc= new Scanner(System.in);
		int n=sc.nextInt();
		if(n<1200)
			System.out.println(1200);
		else if(n>=1200 && n<1400)
			System.out.println(1400);
		else if(n>=1400 && n<1600)
			System.out.println(1600);
		else if(n>=1600 && n<1900)
			System.out.println(1900);
		else if(n>=1900 && n<2100)
			System.out.println(2100);
		else if(n>=2100 && n<2300)
			System.out.println(2300);
		else if(n>=2300 && n<2400)
			System.out.println(2400);
		else if(n>=2400 && n<2600)
			System.out.println(2600);
		else if(n<3000)
			System.out.println(3000);
		sc.close();

	}

}


import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.PI;
import static java.lang.System.in;
import static java.lang.System.out;
import static java.lang.System.err;

public class B {
    public static void main(String[] args) throws Exception {
        Foster sc = new Foster();
        PrintWriter p = new PrintWriter(out);

       /*
        * Is that extra condition needed
        * Check overflow in pow function or in general
        * Check indices of read array functions
        * Think of an easier solution because the problems you solve are always easy
        * Check the iterator of loop
        */

        int n = sc.nextInt();
        n++;
        int a[] = {1200,1400,1600,1900,2100,2300,2400,2600,3000};
        TreeSet<Integer> set = new TreeSet<>();
        for(int i : a) set.add(i);
        p.println(set.ceiling(n));

        p.close();
    }

    static long[] sort(long a[]) {
        ArrayList<Long> arr = new ArrayList<>();
        for(long i : a) {
            arr.add(i);
        }
        Collections.sort(arr);
        for(int i = 0; i < arr.size(); i++) {
            a[i] = arr.get(i);
        }
        return a;
    }
    static int[] sort(int a[]) {
        ArrayList<Integer> arr = new ArrayList<>();
        for(int i : a){
            arr.add(i);
        }
        Collections.sort(arr);
        // Collections.reverse(arr);
        for(int i = 0; i < arr.size(); i++){
            a[i] = arr.get(i);
        }
        return a;
    }

    static class Foster {
        BufferedReader br = new BufferedReader(new InputStreamReader(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());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
        int[] intArray(int n) {
            int arr[] = new int[n];
            for(int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }
        long[] longArray(int n) {
            long arr[] = new long[n];
            for(int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
        static long pow(long... a) {
            long mod = Long.MAX_VALUE;
            if(a.length == 3)   mod = a[2];
            long res = 1;
            while(a[1] > 0) {
                if((a[1] & 1) == 1)
                    res = (res * a[0]) % mod;
                a[1] /= 2;
                a[0] = (a[0] * a[0]) % mod;
            }
            return res;
        }
        static long gcd(long a, long b) {
            if (b == 0)
                return a;
            return gcd(b, a % b);
        }
    }
}


import java.util.*;
public class problem{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int[] a = new int[9];
        a[0] = 1200;
        a[1] = 1400;
        a[2] = 1600;
        a[3] = 1900;
        a[4] = 2100;
        a[5] = 2300;
        a[6] = 2400;
        a[7] = 2600;
        a[8] = 3000;
        int b = 0;
        int r = sc.nextInt();
        while(a[b] <= r){
            b ++;
        }
        System.out.print(a[b]);
        sc.close();
    }
}


import java.util.Scanner;

public class B {
    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 (var v: values) {
            if (x < v) {
                System.out.println(v);
                return;
            }
        }
    }
}


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

public class Main {
    public static void main(String... args) {
        Scanner input = new Scanner(System.in);
        int n = input.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 if(n<3000)
            System.out.println(3000);

    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

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

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

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

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

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

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

        public int lcm(int a, int b, int g) {
            return a/g*b;
        }
        public int[] sort(int[] arr) {
            int mid, len, i, j, k;
            len = arr.length;
            mid = len/2;
            if (len == 1) {
                return arr;
            }

            int[] a1 = sort(Arrays.copyOfRange(arr, 0, mid));
            int[] a2 = sort(Arrays.copyOfRange(arr, mid, len));

            i = j = k = 0;
            while (i < a1.length && j < a2.length) {
                if (a1[i] > a2[j]) arr[k] = a2[j++];
                else arr[k] = a1[i++];
                k++;
            }
            if (i < a1.length) while (k < len) arr[k++] = a1[i++];
            else while (k < len) arr[k++] = a2[j++];
            return arr;

        }

    }
}


import java.util.Scanner;

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


import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int a[] = { 1200, 1400, 1600, 1900, 2100, 2300, 2400, 2600, 3000 };
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        sc.close();
        for (int i = 0; i < a.length; ++i) {
            if (a[i] > r) {
                System.out.println(a[i]);
                break;
            }
        }
    }
}


import java.util.*;
public class Round_780_Div_3 {
    public static void main(String[] args) {
        Scanner str = new Scanner(System.in);
        int n = str.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.lang.*;
import java.io.*;
import java.util.*;
public class My
{
    public static void main(String[] args)
    {
        Scanner scn=new Scanner(System.in);
        int n=scn.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 if(n < 3000) System.out.println(3000);
    }
}


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

public class practice {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new PrintWriter(System.out)));
        StringBuilder sb = new StringBuilder();

        int n = Integer.parseInt(br.readLine());

        TreeSet<Integer> set = new TreeSet<>(Arrays.asList(1200, 1400, 1600, 1900, 2100, 2300, 2400, 2600, 3000));

        sb.append(set.higher(n));

        pw.println(sb.toString().trim());
        pw.close();
        br.close();
    }
}


import java.util.Scanner;
public class Main {
    public static void main(String args[]) {
        Scanner read = new Scanner(System.in);
        int n = read.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.awt.*;
import java.util.*;
import java.io.*;

// You have that in you, you can do it........
public class Codeforces {
    static FScanner sc = new FScanner();
    static PrintWriter out = new PrintWriter(System.out);
    static final Random random = new Random();
    static long mod = 1000000007L;
    static HashMap<String, Integer> map = new HashMap<>();
    static boolean[] sieve = new boolean[1000000];
    static double[] fib = new double[1000000];

    public static void main(String args[]) throws IOException {
            int n = sc.nextInt();
            if(n<1200)
                out.println(1200);
            else if(n<1400)
                out.println(1400);
            else if(n<1600)
                out.println(1600);
            else if(n<1900)
                out.println(1900);
            else if(n<2100)
                out.println(2100);
            else if(n<2300)
                out.println(2300);
            else if(n<2400)
                out.println(2400);
            else if(n<2600)
                out.println(2600);
            else if(n<3000)
                out.println(3000);
        out.close();
    }

    // TemplateCode

    static void fib() {
        fib[0] = 0;
        fib[1] = 1;
        for (int i = 2; i < fib.length; i++)
            fib[i] = fib[i - 1] + fib[i - 2];
    }

    static void primeSieve() {
        for (int i = 0; i < sieve.length; i++)
            sieve[i] = true;
        for (int i = 2; i * i <= sieve.length; i++) {
            if (sieve[i]) {
                for (int j = i * i; j < sieve.length; j += i) {
                    sieve[j] = false;
                }
            }
        }
    }

    static int max(int a, int b) {
        if (a < b)
            return b;
        return a;
    }

    static int min(int a, int b) {
        if (a < b)
            return a;
        return b;
    }

    static void ruffleSort(int[] a) {
        int n = a.length;
        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 <E> void print(E res) {
        System.out.println(res);
    }

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

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

    static int abs(int a) {
        if (a < 0)
            return -1 * a;
        return a;
    }

    static class FScanner {
        BufferedReader br;
        StringTokenizer st;

        public FScanner() {
            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[] readintarray(int n) {
            int res[] = new int[n];
            for (int i = 0; i < n; i++) res[i] = nextInt();
            return res;
        }

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

}


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

// The main method must be in a class named "Main".
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int[] a = {1200, 1400, 1600, 1900, 2300, 2400, 2600, 3000};
        int k=sc.nextInt();
        for(int b:a){
            if(b>k){
                System.out.println(b);
                break;
            }
        }
    }
}


import java.util.*;
public class CF_APRILFOOL_B{
    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.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int[] a = {1200, 1400, 1600, 1900, 2300, 2400, 2600, 3000};
            int x = in.nextInt();
            for (int y : a) {
                if (y > x) {
                    out.println(y);
                    return;
                }
            }
        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            try {
                in = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
            } catch (Exception e) {
                throw new AssertionError();
            }
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

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

    }
}


import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class B {

	static void solve() throws Exception {
		int a = scanInt();
		out.print(a >= 2600 ? 3000 :
			a >= 2400 ? 2600 :
			a >= 2300 ? 2400 :
			a >= 2100 ? 2300 :
			a >= 1900 ? 2100 :
			a >= 1600 ? 1900 :
			a >= 1400 ? 1600 :
			a >= 1200 ? 1400 : 1200);
	}

	static int scanInt() throws IOException {
		return parseInt(scanString());
	}

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

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

	static BufferedReader in;
	static PrintWriter out;
	static StringTokenizer tok;

	public static void main(String[] args) {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			solve();
			in.close();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			exit(1);
		}
	}
}


import java.util.*;public class f{public static void main(String[]args){Scanner s=new Scanner(System.in);int r=s.nextInt()/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.*;
import java.util.*;

public class codeforces_aprilFools_B {
    private static void solve(FastIOAdapter in, PrintWriter out) {
        int n = in.nextInt();
        if (n < 1200) out.println(1200);
        else if (n < 1400) out.println(1400);
        else if (n < 1600) out.println(1600);
        else if (n < 1900) out.println(1900);
        else if (n < 2100) out.println(2100);
        else if (n < 2300) out.println(2300);
        else if (n < 2400) out.println(2400);
        else if (n < 2600) out.println(2600);
        else out.println(3000);
    }

    public static void main(String[] args) throws Exception {
        try (FastIOAdapter ioAdapter = new FastIOAdapter()) {
            int count = 1;
            //count = ioAdapter.nextInt();
            while (count-- > 0) {
                solve(ioAdapter, ioAdapter.out);
            }
        }
    }

    static void ruffleSort(int[] arr) {
        int n = arr.length;
        Random rnd = new Random();
        for (int i = 0; i < n; ++i) {
            int tmp = arr[i];
            int randomPos = i + rnd.nextInt(n - i);
            arr[i] = arr[randomPos];
            arr[randomPos] = tmp;
        }
        Arrays.sort(arr);
    }

    static class FastIOAdapter implements AutoCloseable {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        public PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter((System.out))));
        StringTokenizer st = new StringTokenizer("");

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

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

        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[] readArrayLong(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nextLong();
            return a;
        }

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

        @Override
        public void close() throws Exception {
            out.flush();
            out.close();
            br.close();
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
public class Codeforces2
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		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 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();
			TreeSet<Integer>tr=new TreeSet<>();
			tr.add(1200);tr.add(1400);tr.add(1600);tr.add(1900);tr.add(2100);tr.add(2400);tr.add(2700);tr.add(3000);
			println(tr.higher(n));
		}

	}
	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);
	}
}


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

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        TreeSet<Integer> a = new TreeSet<Integer>();
        a.add(1200);
        a.add(1400);
        a.add(1600);
        a.add(1900);
        a.add(2100);
        a.add(2300);
        a.add(2400);
        a.add(2600);
        a.add(3000);
        int n = Integer.parseInt(br.readLine());
        System.out.print(a.higher(n));
    }
}


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

public class MikesSequence {
    private static int[] ratings = {1200,1400,1600,1900,2100,2300,2400,2600,3000};

    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();

        for (int i = 0; i < ratings.length; i++)  {
            if (n < ratings[i])  {
            	out.println(ratings[i]);
            	break;
            }
        }
        out.close();
    }

    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) {
                    // noop
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble()  {
            return Double.parseDouble(next());
        }
    }

}


import java.util.*;
public class Solution {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int r = sc.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("190p");
    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 System.out.println("3000");

    }
}

/*
 Output of the program would be :
 100
 100
 */


import com.sun.security.jgss.GSSUtil;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Random;

public class AAtempOneForCodeForces {
    @SuppressWarnings("FieldCanBeLocal")
    private static Reader in;
    private static PrintWriter out;

    private static void solve() throws IOException{
        //Your Code Goes Here;
        int n = in.nextInt();
        if (n < 1200)
        {
            out.println(1200);
        }
        else if (n < 1400)
        {
            out.println(1400);
        }
        else if (n < 1600)
        {
            out.println(1600);
        }
        else if (n < 1900)
        {
            out.println(1900);
        }
        else if(n < 2100)
        {
            out.println(2100);
        }
        else if (n < 2300)
        {
            out.println(2300);
        }
        else if(n<2400)
        {
            out.println(2400);
        }
        else if (n < 2600)
        {
            out.println(2600);
        }
        else
        {
            out.println(3000);
        }
    }

    private static void returnNothing(){return;}

    public static void main(String[] args) throws IOException {
        //FastScaner fs = new FastScaner();//There is a class below .. uncomment that class to instantiate an object from that class;
        //int t = fs.nextInt();//uncomment this line when you're using the fastscaner class;
        in = new Reader();
        out = new PrintWriter(new OutputStreamWriter(System.out));
        int T = 1;
        while(T-->0){
            solve();
        }
        out.flush();
        in.close();
        out.close();
    }
    static final Random random = new Random();
    static final int mod = 1_000_000_007;
    //Taken From "Second Thread"
    static void ruffleSort(int[] a){
        int n = a.length;//shuffles, then sort;
        for(int i=0; i<n; i++){
            int oi = random.nextInt(n), temp = a[oi];
            a[oi] = a[i]; a[i] = temp;
        }
        sort(a);
    }
    private static void longRuffleSort(long[] a){
        long n = a.length;
        for(long i = 0;i<n;i++){
            long oi = random.nextInt((int) n), temp = a[(int) oi];
            a[(int) oi] = a[(int) i]; a[(int) i] = temp;
        }
        longSort(a);
    }
    public static boolean primeFinder(int n){
        int m = 0;
        int flag = 0;
        m = n / 2;
        if(n == 0 ||n == 1){
            return false;
        }
        else{
            for(int i=2;i<=m;i++){
                if(n % i == 0){
                    return false;
                }
            }
            return true;
        }
    }
    private static boolean[] sieveOfEratosthenes(long n) {
        boolean prime[] = new boolean[(int)n + 1];
        for (int i = 0; i <= n; i++) {
            prime[i] = true;
        }
        for (long p = 2; p * p <= n; p++) {
            if (prime[(int)p] == true) {
                for (long i = p * p; i <= n; i += p)
                    prime[(int)i] = false;
            }
        }
        return prime;
    }
    private static int log2(int n){
        int result = (int) (Math.log(n) / Math.log(2));
        return result;
    }
    private static long add(long a, long b){
        return (a + b) %  mod;
    }
    private static int gcd(int a, int b) {
        if (a == 0 || b == 0)
            return 0;
        while (b != 0) {
            int tmp;
            tmp = a % b;
            a = b;
            b = tmp;
        }
        return a;
    }
    private static long lcm(long a, long b){
        return (a / gcd((int) a, (int) b) * b);
    }
    private 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);
    }
    private static void longSort(long[] a){
        ArrayList<Long> l = new ArrayList<Long>();
        for(long i:a) l.add(i);
        Collections.sort(l);
        for(int i=0;i<a.length;i++)a[i] = l.get(i);
    }
    public static int[][] prefixsum( int n , int m , int arr[][] ){
        int prefixsum[][] = new int[n+1][m+1];
        for( int i = 1 ;i <= n ;i++) {
            for( int j = 1 ; j<= m ; j++) {
                int toadd = 0;
                if( arr[i-1][j-1] == 1) {
                    toadd = 1;
                }
                prefixsum[i][j] = toadd + prefixsum[i][j-1] + prefixsum[i-1][j] - prefixsum[i-1][j-1];
            }
        }
        return prefixsum;
    }

    //call this method when you want to read an integer array;
    private static int[] readArray(int len) throws IOException{
        int[] a = new int[len];
        for(int i=0;i<len;i++)a[i] = in.nextInt();
        return a;
    }
    //call this method when you want to read an Long array;
    private static long[] readLongArray(int len) throws IOException{
        long[] a = new long[len];
        for(int i=0;i<len;i++) a[i] = in.nextLong();
        return a;
    }
    //call this method to print the integer array;
    private static void printArray(int[] array){
        for(int now : array) out.print(now);out.print(' ');out.close();
    }
    //call this method to print the long array;
    private static void printLongArray(long[] array){
        for(long now:array) out.print(now); out.print(' '); out.close();
    }

    /*Another way of Reading input...collected from a online blog
    from here => https://codeforces.com/contest/1625/submission/144334744;*/
    static class Reader {
        private static final int BUFFER_SIZE = 1 << 16;
        private final DataInputStream din;
        private final byte[] buffer;
        private int bufferPointer, bytesRead;

        Reader() {//Constructor;
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {//To take user input for String values;
            final byte[] buf = new byte[1024]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextSign() throws IOException {//For taking the signs like plus or minus ...
            byte c = read();
            while ('+' != c && '-' != c) {
                c = read();
            }
            return '+' == c ? 0 : 1;
        }

        private static boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() throws IOException {
            int b;
            // noinspection ALL
            while ((b = read()) != -1 && isSpaceChar(b)) {
                ;
            }
            return b;
        }

        public char nc() throws IOException {
            return (char) skip();
        }

        public String next() throws IOException {
            int b = skip();
            final StringBuilder sb = new StringBuilder();
            while (!isSpaceChar(b)) { // when nextLine, (isSpaceChar(b) && b != ' ')
                sb.appendCodePoint(b);
                b = read();
            }
            return sb.toString();
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg) {
                return -ret;
            }
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg) {
                return -ret;
            }
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg) {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            din.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;

        O : while(t-->0)
        {
            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);
            }
        }
        out.flush();
    }

static void printN()
{
    System.out.println("NO");
}
static void printY()
{
    System.out.println("YES");
}

static int findfrequencies(int a[],int n)
{
    int count=0;
    for(int i=0;i<a.length;i++)
    {
        if(a[i]==n)
        {
            count++;
        }
    }
    return count;
}

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 int[] EvenOddArragement(int a[])
{
    ArrayList<Integer> list=new ArrayList<>();
    for(int i=0;i<a.length;i++)
    {
        if(a[i]%2==0)
        {
            list.add(a[i]);
        }
    }
    for(int i=0;i<a.length;i++)
    {
        if(a[i]%2!=0)
        {
            list.add(a[i]);
        }
    }
    for(int i=0;i<a.length;i++)
    {
        a[i]=list.get(i);
    }
    return a;
}
static int gcd(int a, int b) {
    while (b != 0) {
        int t = a;
        a = b;
        b = t % b;
    }
    return a;
}
    static int lcm(int a, int b)
    {
        return (a / gcd(a, b)) * b;
    }

    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 int DigitSum(int n)
    {
        int r=0,sum=0;
        while(n>=0)
        {
            r=n%10;
            sum=sum+r;
            n=n/10;
        }
        return sum;
    }
    static boolean checkPerfectSquare(int number)
    {
        double sqrt=Math.sqrt(number);
        return ((sqrt - Math.floor(sqrt)) == 0);
    }
    static boolean isPowerOfTwo(int n)
    {
        if(n==0)
        return false;

        return (int)(Math.ceil((Math.log(n) / Math.log(2)))) == (int)(Math.floor(((Math.log(n) / Math.log(2)))));
    }
    static boolean isPrime2(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 String minLexRotation(String str)
    {
        int n = str.length();
        String arr[] = new String[n];
        String concat = str + str;
        for(int i=0;i<n;i++)
        {
            arr[i] = concat.substring(i, i + n);
        }
        Arrays.sort(arr);
        return arr[0];
    }

static String maxLexRotation(String str)
    {
        int n = str.length();
        String arr[] = new String[n];
        String concat = str + str;
        for (int i = 0; i < n; i++)
        {
            arr[i] = concat.substring(i, i + n);
        }
        Arrays.sort(arr);
        return arr[arr.length-1];
    }
    static class P implements Comparable<P> {
		int i, j;
		public P(int i, int j) {
			this.i=i;
			this.j=j;
		}
		public int compareTo(P o) {
			return Integer.compare(i, o.i);
		}
	}
	static class pair{
	    int i,j;
	    pair(int x,int y){
	        i=x;
	        j=y;
	    }
	}
	static int binary_search(int a[],int value)
	{
	    int start=0;
	    int end=a.length-1;
	    int mid=start+(end-start)/2;
	    while(start<=end)
	    {
	        if(a[mid]==value)
	        {
	            return mid;
	        }
	        if(a[mid]>value)
	        {
	            end=mid-1;
	        }
	        else
	        {
	            start=mid+1;
	        }
	        mid=start+(end-start)/2;
	    }
	    return -1;
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

	private static void solve(InputScanner in, PrintWriter out) throws IOException {
		int x = in.nextInt();
		if (x < 1200) {
			out.println(1200);
		} else if (x < 1400) {
			out.println(1400);
		} else if (x < 1600) {
			out.println(1600);
		} else if (x < 1800) {
			out.println(1800);
		} else if (x < 2000) {
			out.println(2000);
		} else if (x < 2200) {
			out.println(2200);
		} else if (x < 2400) {
			out.println(2400);
		} else if (x < 2600) {
			out.println(2600);
		} else if (x < 2800) {
			out.println(2800);
		} else {
			out.println(3000);
		}
	}

	public static class InputScanner {

		private BufferedReader in;
		private StringTokenizer st;

		public InputScanner(InputStream is) {
			in = new BufferedReader(new InputStreamReader(is));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(in.readLine());
			}
			return st.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 void close() throws IOException {
			in.close();
		}
	}

	private static InputScanner in;
	private static PrintWriter out;

	private static void init() throws IOException {
		in = new InputScanner(System.in);
		out = new PrintWriter(System.out);
		solve(in, out);
		in.close();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		init();
	}
}


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

public class p3
{
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        if (n <= 1199)
            System.out.println(1200);
        else if (n <= 1399)
            System.out.println(1400);
        else if (n <= 1599)
            System.out.println(1600);
        else if(n <=1899)
            System.out.println(1900);
        else if(n <=2099)
            System.out.println(2100);
        else if(n<=2299)
            System.out.println(2300);
        else if(n<=2399)
            System.out.println(2400);
        else if(n<=2599)
            System.out.println(2600);
        else
            System.out.println(3000);
    }
}


import java.util.*;
import java.util.stream.Collectors;

public class sample {

		public static void main(String[] args) {
			Scanner s=new Scanner(System.in);
			int n=s.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.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.fill;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.sort;

public class Main {
	public static void main(String[] args) throws IOException {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					try {
						if (new File("input.txt").exists())
							System.setIn(new FileInputStream("input.txt"));
					} catch (SecurityException e) {}
					new Main().run();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}, "1", 1L << 24).start();
	}

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

	int OFFSET = 500;

	int N;
	int D;
	int[][] dx;
	int[][] dy;

	int[][] mem;

	int UNKNOWN = 0;
	int WIN = 1;
	int LOOSE = 2;

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);

		int x = nextInt();
		int y = nextInt();
		N = nextInt();
		int d = nextInt(); D = d * d;

		dx = new int [2][N];
		dy = new int [2][N];

		for (int i = 0; i < N; i++) {
			dy[1][i] = dx[0][i] = nextInt();
			dx[1][i] = dy[0][i] = nextInt();
		}

		mem = new int [2 * OFFSET + 1][2 * OFFSET + 1];
		out.println(rec(x, y, 0) == WIN ? "Anton" : "Dasha");

		out.close();
	}

	int rec(int x, int y, int rot) {
		if (x * x + y * y > D) return WIN;
		int mem = mem(x, y);
		if (mem != UNKNOWN) return mem;
		int ret = LOOSE;
		for (int dir = 0; dir < N; dir++) {
			int nx = x + dx[rot][dir];
			int ny = y + dy[rot][dir];
			int res = rec(nx, ny, rot);
			if (res == LOOSE) {
				ret = WIN;
				break;
			}
		}
		return remember(x, y, ret);
	}

	int remember(int x, int y, int val) {
		return mem[x + OFFSET][y + OFFSET] = val;
	}

	int mem(int x, int y) {
		return mem[x + OFFSET][y + OFFSET];
	}

	/***************************************************************
	 * Input
	 **************************************************************/
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}

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

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

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

	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}

	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class MainE {

    private FastScanner in;
    private PrintWriter out;

    long MOD = 998244353L;

    long[] gcd_ex(long a, long b) {
        if (a == 0) {
            return new long[]{0, 1};
        }
        long[] res = gcd_ex(b % a, a);
        long t = res[0];
        res[0] = res[1] - (b / a) * res[0];
        res[1] = t;
        return res;
    }

    long reverse(long a) {
        return (gcd_ex(a, MOD)[0] + 100 * MOD) % MOD;
    }

    long powMod(long a, long b) {
        long res = 1;
        long mul = a;
        while (b > 0) {
            if ((b & 1) > 0) {
                res = (res * mul) % MOD;
            }
            mul = (mul * mul) % MOD;
            b /= 2;
        }
        return res;
    }

    public void solve() {
        long N = in.nextInt();
        long[] combs = new long[(int)(N + 1)];
        combs[0] = 1;
        for (int i = 1; i <= N; i++) {
            long t = combs[i - 1];
            t = (t * (N - i + 1)) % MOD;
            t = (t * reverse(i)) % MOD;
            combs[i] = t;
        }
        long res = 0;
        long p1 = 1;
        long p2 = 1;
        long R = powMod(reverse(3), N);
        for (int i = 1; i <= N; i++) {
            p1 = (p1 * R) % MOD;
            p2 = (p2 * 3) % MOD;
            long t = combs[i] * p1 % MOD;
            t = (t * p2) % MOD;
            if ((i & 1) > 0) {
                res += 2 * t;
            } else {
                res = (res + 2 * MOD - 2 * t) % MOD;
            }
            res %= MOD;
        }
        res = res * powMod(3, N * N) % MOD;
        long i3 = 1;
        for (int i = 0; i < N; i++){
            long mi3 = (MOD - i3) % MOD;
            i3 = (i3 * 3) % MOD;
            long t = combs[i] * ((MOD + powMod(1 + mi3, N) - powMod(mi3, N)) % MOD) % MOD;
            if ((i & 1) > 0) {
                res += 3 * t;
            } else {
                res = (res + 3 * MOD - 3 * t) % MOD;
            }
            res %= MOD;
        }
        System.out.println(res);
    }

    public void run() {
        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    class FastScanner {

        BufferedReader br;
        StringTokenizer st;

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

        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());
        }
    }

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


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

public class D {

	static final int MOD = 1000000007;

	static void solve() throws IOException {
		int k = nextInt();
		out.println(get(k));
	}

	private static int get(int k) {
		int answer = 0;

		int maxC = 32;
		int[][] choose = new int[maxC][maxC];
		for (int i = 0; i < maxC; i++) {
			choose[i][0] = choose[i][i] = 1;
			for (int j = 1; j < i; j++) {
				choose[i][j] = add(choose[i - 1][j - 1], choose[i - 1][j]);
			}
		}

		int bitLength = 32 - Integer.numberOfLeadingZeros(k);
		for (int matchWithK = 0; matchWithK <= bitLength; matchWithK++) {
			int bitsRemaining = bitLength - matchWithK;
			int onesTotal = Integer.bitCount(k >> bitsRemaining);

			if (bitsRemaining > 0 && (k & (1 << bitsRemaining - 1)) == 0) {
				continue;
			}

			for (int sizeFirstHalf = 0; sizeFirstHalf <= onesTotal; sizeFirstHalf++) {
				if ((sizeFirstHalf == 0) ^ (matchWithK == 0)) {
					continue;
				}
				int chooseFirstHalf;
				if (matchWithK > 0) {
					chooseFirstHalf = chooseFirstHalf(k >> bitsRemaining,
							sizeFirstHalf);
				} else {
					chooseFirstHalf = 1;
				}

				if (bitsRemaining == 0) {
					answer = add(answer, chooseFirstHalf);
					continue;
				}

				if (matchWithK > 0) {
					chooseFirstHalf = mul(chooseFirstHalf,
							1 << (sizeFirstHalf - 1));
				}
				int[] chooseSecondHalf = numberOfSetsSimple(bitsRemaining - 1);
				for (int sizeSecondHalf = 0; sizeSecondHalf < chooseSecondHalf.length; sizeSecondHalf++) {
					int ways;
					int chooseSecond = chooseSecondHalf[sizeSecondHalf];
					if (matchWithK == 0) {
						ways = 1;
					} else {
						ways = modPow(2, (bitsRemaining - 1 - sizeSecondHalf)
								* sizeFirstHalf);
					}
					ways = mul(ways, chooseSecond);
					ways = mul(ways, chooseFirstHalf);
					answer = add(answer, ways);
				}
			}
		}
		return answer;
	}

	private static int chooseFirstHalf(int mask, int size) {
		int bits = 32 - Integer.numberOfLeadingZeros(mask);
		int[][] dp = new int[bits + 1][size + 1];

		dp[1][1] = 1;
		for (int bit = 2; bit <= bits; bit++) {
			for (int s = 1; s <= size; s++) {
				int ways1 = mul(1 << (s - 1), dp[bit - 1][s]);
				int ways2;
				if ((mask & (1 << bits - bit)) == 0) {
					ways2 = 0;
				} else {
					ways2 = dp[bit - 1][s - 1];
				}
				dp[bit][s] = add(ways1, ways2);
			}
		}
		return dp[bits][size];
	}

	private static int[] numberOfSetsSimple(int bits) {
		int[][] dp = new int[bits + 1][bits + 1];
		dp[0][0] = 1;
		for (int b = 1; b <= bits; b++) {
			dp[b][0] = 1;
			for (int size = 1; size <= b; size++) {
				dp[b][size] = add(dp[b - 1][size],
						mul(dp[b - 1][size - 1], 1 << b - size));
			}
		}
		return dp[bits];
	}

	static int modPow(int a, long pow) {
		int res = 1 % MOD;
		while (pow > 0) {
			if ((pow & 1) != 0) {
				res = mul(res, a);
			}
			a = mul(a, a);
			pow >>= 1;
		}
		return res;
	}

	static int add(int a, int b) {
		a += b;
		if (a >= MOD || a < 0) {
			a -= MOD;
		}
		return a;
	}

	static int mul(int a, int b) {
		return (int) ((long) a * b % MOD);
	}

	static BufferedReader br;
	static StringTokenizer st;
	static PrintWriter out;

	public static void main(String[] args) throws IOException {
		InputStream input = System.in;
		PrintStream output = System.out;
		File file = new File("d.in");
		if (file.exists() && file.canRead()) {
			input = new FileInputStream(file);
		}
		br = new BufferedReader(new InputStreamReader(input));
		out = new PrintWriter(output);
		solve();
		out.close();
	}

	static long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	static String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String line = br.readLine();
			if (line == null) {
				return null;
			}
			st = new StringTokenizer(line);
		}
		return st.nextToken();
	}
}


import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Andrey Menkov (nothingelsematters7@gmail.com)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
    private long MOD;

    private long powInd(long a, long n) {
        if (n == 0) return 1;
        if ((n & 1) != 0) return (a * powInd((a * a) % MOD, n / 2)) % MOD;
        return powInd((a * a) % MOD, n / 2) % MOD;
    }

    private long getFibb(long n) {
        long a11 = 1, a12 = 1, a21 = 1, a22 = 0;
        long r11 = 1, r12 = 0;
        long q11 = 0, q12 = 0, q21 = 0, q22 = 0;
        while (n > 0) {
            if ((n & 1) == 1) {
                q11 = (r11 * a11 + r12 * a21) % MOD;
                q12 = (r11 * a12 + r12 * a22) % MOD;
                r11 = q11;
                r12 = q12;
            }
            q11 = (a11 * a11 + a12 * a21) % MOD;
            q12 = (a11 * a12 + a12 * a22) % MOD;
            q21 = (a21 * a11 + a22 * a21) % MOD;
            q22 = (a21 * a12 + a22 * a22) % MOD;
            a11 = q11;
            a12 = q12;
            a21 = q21;
            a22 = q22;

            n >>= 1;
        }
        return r12;
    }

    public void solve(int testNumber, Scanner in, PrintWriter out) {
        long n = in.nextLong(), k = in.nextLong(), l = in.nextLong(), m = in.nextLong();
        MOD = m;

        if (l < 63 && k >= (1L << l)) {
            out.println(0);
            return;
        }

        long fib = getFibb(n + 2);
        long pow = powInd(2, n);
        long res = 1;

        long diff = pow - fib;
        while (diff < 0) diff += MOD;

        for (int bit = 0; bit < l; bit++) {
            if ((k & (1L << bit)) != 0) {
                res = (res * diff) % MOD;
            } else {
                res = (res * fib) % MOD;
            }
        }

        out.println(res % MOD);
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;

/**
 * @author khokharnikunj8
 */

public class Main {
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                new Main().solve();
            }
        }, "1", 1 << 26).start();
    }

    void solve() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        ScanReader in = new ScanReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AChores solver = new AChores();
        solver.solve(1, in, out);
        out.close();
    }

    static class AChores {
        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            int k = in.scanInt();
            int x = in.scanInt();
            long ans = 0;
            for (int i = 0; i < n - k; i++) ans += in.scanInt();
            ans += (x * k);
            out.println(ans);
        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int index;
        private BufferedInputStream in;
        private int total;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (index >= total) {
                index = 0;
                try {
                    total = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (total <= 0) return -1;
            }
            return buf[index++];
        }

        public int scanInt() {
            int integer = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                }
            }
            return neg * integer;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

    }
}


import java.util.*;
import java.io.*;
import java.math.*;
import java.util.Comparator;
public class Main
{
    public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer stk =new StringTokenizer(br.readLine());
        int n = Integer.parseInt(stk.nextToken());
        int m = Integer.parseInt(stk.nextToken());
        int[] arr = new int[n];
        stk = new StringTokenizer(br.readLine());

        for(int i=0;i<n;i++){
            arr[i]  =Integer.parseInt(stk.nextToken());
        }

        Arrays.sort(arr);
        int l = 1;
        int r = n;
        long min = Long.MAX_VALUE;
        while(l<=r){
            int mid = (l+r)/2;
            long sum = 0;
            int cnt = 0 ;
            //System.out.println(mid);
            for(int i=n-1; i >= 0 ; i -= mid){
                for(int k=0;k<mid && i - k >=0;k++){
                    sum += Math.max(0,arr[i-k] - cnt);
                }
                cnt++;
            }
            //System.out.println(sum);
            if(sum >= m){
                r = mid -1;
                min = Math.min(mid,min);
            }
            else
                l = mid +1;
        }
        if(min == Long.MAX_VALUE){
            System.out.println(-1);
        }
        else{
            System.out.println(min);
        }
    }
}


import java.util.*;
import java.math.*;
public class codeforces {

         public static void main(String[] args)
        {
                Scanner sc=new Scanner(System.in);
                String data=sc.next();
                int mem[]=new int[10];
                Arrays.fill(mem, 0);
                for(char x:data.toCharArray())
                {
                	int t=x-'0';
                	mem[t]++;
                }
                int num=-1;
                int last=-1;
                for(int i=1;i<=5;i++)
                {
                	if(mem[i]==0||mem[10-i]==0)
                		continue;
                	int temp[]=new int[10];
                	for(int j=0;j<10;j++)
                	{
                		temp[j]=mem[j];
                	}
                	int tt=1;
                	temp[i]--;
                	temp[10-i]--;
                	for(int j=0;j<=4;j++)
                	{
                		int k=Math.min(temp[j], temp[9-j]);
                		k=Math.max(0, k);
                		temp[j]-=k;
                		temp[9-j]-=k;
                		tt+=2*k;
                	}
                    int mem1[]=new int[10];
                    int mem2[]=new int[10];
                    for(int j=0;j<10;j++)
                    {
                    	mem1[j]=temp[j];
                    	mem2[j]=temp[j];
                    }
                    mem1[10-i]++;
                    mem2[i]++;
                    if(mem1[9-i]>0)
                    {
                    	mem1[9-i]--;
                    	mem2[i]--;
                    	tt++;

                    }
                    if(mem2[i-1]>0)
                    {

                    	mem1[10-i]--;
                    	mem2[i-1]--;
                    	tt++;

                    }
                	tt+=Math.min(mem1[0], mem2[0]);
                	if(tt>num)
                	{
                		num=tt;
                		last=i;
                	}
                }
             //   System.out.println(last);
              //  System.out.println(num);
                if(last==-1)
                {
                	for(int i=0;i<2;i++)
                	{
                		for(int j=9;j>=0;j--)
                		{
                			for(int k=0;k<mem[j];k++)
                			{
                				System.out.print(j);
                			}
                		}
                		System.out.println("");
                	}
                	return;
                }
                int len=data.length();
                char num1[]=new char[len];
                char num2[]=new char[len];
                int index=len-1;
                int zero=Math.max(0, mem[0]-mem[9]);
                mem[0]-=zero;
                for(int i=0;i<zero;i++,index--)
                {
                	num1[index]='0';
                	num2[index]='0';
                }
                mem[last]--;
                mem[10-last]--;
                num1[index]=(char)(last+'0');
                num2[index]=(char)(10-last+'0');
                index--;
                for(int i=0;i<=4;i++)
                {
                	int k=Math.min(mem[i], mem[9-i]);
                	k=Math.max(0, k);
                	for(int j=0;j<k;j++)
                	{
                		num1[index]=(char)('0'+i);
                		num2[index]=(char)('0'+9-i);
                		index--;
                		num1[index]=(char)('0'+9-i);
                		num2[index]=(char)('0'+i);
                		index--;
                	}
                	mem[i]-=k;
                	mem[9-i]-=k;
                }
                int mem1[]=new int[10];
                int mem2[]=new int[10];
                for(int i=0;i<10;i++)
                {
                	mem1[i]=mem[i];
                	mem2[i]=mem[i];
                }
                mem1[10-last]++;
                mem2[last]++;
                if(mem1[9-last]>0)
                {
                	num1[index]=(char)('0'+9-last);
                	num2[index]=(char)('0'+last);
                	index--;
                	mem1[9-last]--;
                	mem2[last]--;

                }
                if(mem2[last-1]>0)
                {
                	num1[index]=(char)('0'+10-last);
                	num2[index]=(char)('0'+last-1);
                	mem1[10-last]--;
                	mem2[last-1]--;
                	index--;
                }
            	int index1=index;
            	int index2=index;
                for(int i=0;i<10;i++)
                {

                	for(int j=0;j<mem1[i];j++)
                	{
                		num1[index1]=(char)('0'+i);
                		index1--;
                	}
                	for(int j=0;j<mem2[i];j++)
                	{
                		num2[index2]=(char)('0'+i);
                		index2--;
                	}
                }
                System.out.println(new String(num1));
                System.out.println(new String(num2));
                return;
        }

}


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

import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

// Hide-and-Seek
// 2012/04/17
public class _P032E{
	Scanner sc=new Scanner(System.in);

	int INF=1<<28;
	double EPS=1e-9;

	P v, p, w1, w2, m1, m2;

	void run(){
		v=new P(sc.nextInt(), sc.nextInt());
		p=new P(sc.nextInt(), sc.nextInt());
		w1=new P(sc.nextInt(), sc.nextInt());
		w2=new P(sc.nextInt(), sc.nextInt());
		m1=new P(sc.nextInt(), sc.nextInt());
		m2=new P(sc.nextInt(), sc.nextInt());
		solve();
	}

	void solve(){
		println((ok1()||ok2())?"YES":"NO");
	}

	boolean ok1(){
		if(crsSS(p, v, w1, w2)){
			return false;
		}else if(crsSS(p, v, m1, m2)){
			return linear(p, v, m1)&&linear(p, v, m2);
		}else{
			return true;
		}
	}

	boolean ok2(){
		P m=m2.sub(m1);
		if(m.det(p.sub(m1))*m.det(v.sub(m1))<EPS){
			return false;
		}else{
			P h=isLL(m1, m2, p, proj(m1, m2, v).mul(2).sub(v));
			return disSP(m1, m2, h)<EPS&&!crsSS(p, h, w1, w2)
					&&!crsSS(h, v, w1, w2);
		}
	}

	// p1,p2,p3の1直線上判定
	boolean linear(P p1, P p2, P p3){
		return abs(p2.sub(p1).det(p3.sub(p1))/2)<EPS;
	}

	// 線分と点の距離
	double disSP(P p1, P p2, P q){
		if(p2.sub(p1).dot(q.sub(p1))<EPS)
			return q.sub(p1).abs();
		if(p1.sub(p2).dot(q.sub(p2))<EPS)
			return q.sub(p2).abs();
		return disLP(p1, p2, q);
	}

	// 直線と点の距離
	double disLP(P p1, P p2, P q){
		return abs(p2.sub(p1).det(q.sub(p1)))/p2.sub(p1).abs();
	}

	// 線分と線分の交差判定
	boolean crsSS(P p1, P p2, P q1, P q2){
		if(max(p1.x, p2.x)+EPS<min(q1.x, q2.x))
			return false;
		if(max(q1.x, q2.x)+EPS<min(p1.x, p2.x))
			return false;
		if(max(p1.y, p2.y)+EPS<min(q1.y, q2.y))
			return false;
		if(max(q1.y, q2.y)+EPS<min(p1.y, p2.y))
			return false;
		return signum(p2.sub(p1).det(q1.sub(p1)))
				*signum(p2.sub(p1).det(q2.sub(p1)))<EPS
				&&signum(q2.sub(q1).det(p1.sub(q1)))
						*signum(q2.sub(q1).det(p2.sub(q1)))<EPS;
	}

	// 点から直線に下ろした垂線の足
	P proj(P p1, P p2, P q){
		return p1.add(p2.sub(p1).mul(
				p2.sub(p1).dot(q.sub(p1))/p2.sub(p1).abs2()));
	}

	// 直線と直線の交点
	P isLL(P p1, P p2, P q1, P q2){
		double d=q2.sub(q1).det(p2.sub(p1));
		if(abs(d)<EPS)
			return null;
		return p1.add(p2.sub(p1).mul(q2.sub(q1).det(q1.sub(p1))/d));
	}

	class P{
		double x, y;

		P(){
			this(0, 0);
		}

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

		P add(P p){
			return new P(x+p.x, y+p.y);
		}

		P sub(P p){
			return new P(x-p.x, y-p.y);
		}

		P mul(double m){
			return new P(x*m, y*m);
		}

		P div(double d){
			return new P(x/d, y/d);
		}

		double abs(){
			return sqrt(abs2());
		}

		double abs2(){
			return x*x+y*y;
		}

		double arg(){
			return atan2(y, x);
		}

		double dot(P p){
			return x*p.x+y*p.y;
		}

		double det(P p){
			return x*p.y-y*p.x;
		}

		double ang(P p){
			return atan2(det(p), dot(p));
		}

		P rot(double d){
			return new P(cos(d)*x-sin(d)*y, sin(d)*x+cos(d)*y);
		}
	}

	void println(String s){
		System.out.println(s);
	}

	void print(String s){
		System.out.print(s);
	}

	void debug(Object... os){
		System.err.println(Arrays.deepToString(os));
	}

	public static void main(String[] args){
		Locale.setDefault(Locale.US);
		new _P032E().run();
	}
}


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

public class Main implements Runnable {

	final static double eps = 1e-7;

	class Point {
		double x, y;
		Point(double x, double y) {
			this.x = x;
			this.y = y;
		}
		Point add(Point o) {
			return new Point(x + o.x, y + o.y);
		}
		Point sub(Point o) {
			return new Point(x - o.x, y - o.y);
		}
		Point scale(double f) {
			return new Point(x * f, y * f);
		}
		double len() {
			return Math.sqrt(x * x + y * y);
		}
	}

	double dot(Point a, Point b) {
		return a.x * b.x + a.y * b.y;
	}

	double cross(Point a, Point b) {
		return a.x * b.y - a.y * b.x;
	}

	boolean onSegment(Point x, Point a, Point b) {
		if (!zero(cross(a.sub(x), b.sub(x))))
			return false;
		return dot(a.sub(x), b.sub(x)) <= eps;
	}

	Point linesIntersection(Point a, Point b, Point c, Point d) {
		double d1 = cross(c.sub(a), b.sub(a));
		double d2 = cross(d.sub(a), b.sub(a));
		if (Math.abs(d1 - d2) < eps)
			return null;
		return (d.scale(d1).sub(c.scale(d2))).scale(1 / (d1 - d2));
	}

	boolean segsIntersect(Point a, Point b, Point c, Point d) {
		Point p = linesIntersection(a, b, c, d);
		if (p == null)
			return false;
		return onSegment(p, a, b) && onSegment(p, c, d);
	}

	boolean zero(double x) {
		return Math.abs(x) < eps;
	}

	int sign(double x) {
		if (zero(x)) return 0;
		return x < 0 ? -1 : 1;
	}

	Point reflect(Point x, Point a, Point b) {
		Point v = x.sub(a);
		Point dir = b.sub(a);
		dir = dir.scale(1 / dir.len());
		Point pr = dir.scale(dot(dir, v));
		return a.add(pr.scale(2).sub(v));
	}

	public void _main() throws IOException {
		Point v = new Point(nextDouble(),nextDouble());
		Point p = new Point(nextDouble(),nextDouble());
		Point w1 = new Point(nextDouble(),nextDouble());
		Point w2 = new Point(nextDouble(),nextDouble());
		Point m1 = new Point(nextDouble(),nextDouble());
		Point m2 = new Point(nextDouble(),nextDouble());

		if (!segsIntersect(v, p, w1, w2) && !onSegment(w1, v, p) && !onSegment(w2, v, p)) {
			if (zero(cross(m1.sub(v), m1.sub(p))) &&
				zero(cross(m2.sub(v), m2.sub(p))) ||
				!segsIntersect(v, p, m1, m2))
			{
				out.print("YES");
				return;
			}
		}

		int sideV = sign(cross(v.sub(m1), m2.sub(m1)));
		int sideP = sign(cross(p.sub(m1), m2.sub(m1)));
		if (sideV != sideP) {
			out.print("NO");
			return;
		}
		Point ref = linesIntersection(v, reflect(p, m1, m2), m1, m2);
		if (ref == null || !onSegment(ref, m1, m2)) {
			out.print("NO");
			return;
		}
		out.println((!segsIntersect(p, ref, w1, w2) && !segsIntersect(v, ref, w1, w2)) ? "YES" : "NO");
	}

	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);
		}
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.text.DecimalFormat;
import java.util.StringTokenizer;

public class b implements Runnable {

	Vec me, other;
	Seg wall, mirror;

	double getAngle(Vec a, Vec mid, Vec b) {
		Vec u = a.sub(mid), v = b.sub(mid);
		//u.v = |u|*|v|*cos(theta)
		//theta = arccos((u.v)/(|u|*|v|))
		return Math.acos(u.dot(v) / u.mag() / v.mag());
	}

	double go(double scale) {
		Vec unit = mirror.dir.unit();
		Vec leftmost = mirror.from.sub(unit);
		Vec rightmost = mirror.to.add(unit);
		Vec pt = mirror.from.add(unit.scale(scale));
		double left = getAngle(me, pt, leftmost);
		double right = getAngle(other, pt, rightmost);
		return Math.abs(left - right);
	}

	public void solve(FS in, PrintWriter out) {
		me = new Vec(in.nextDouble(), in.nextDouble());
		other = new Vec(in.nextDouble(), in.nextDouble());
		wall = new Seg(new Vec(in.nextDouble(), in.nextDouble()), new Vec(in.nextDouble(), in.nextDouble()));
		mirror = new Seg(new Vec(in.nextDouble(), in.nextDouble()), new Vec(in.nextDouble(), in.nextDouble()));

		Seg meOther = new Seg(me, other);
		if(!meOther.intersects(wall, true) && !meOther.intersects(mirror, false)) {
			out.println("YES");
			return;
		}
		if(meOther.intersects(mirror, false)) {
			out.println("NO");
			return;
		}

		double lo = 0, hi = mirror.dir.mag();
		for(int it = 0; it < 2000; ++it) {
			double delta = (hi - lo) / 3;
			double m1 = lo + delta, m2 = hi - delta;
			double leftDiff = go(m1), rightDiff = go(m2);
			if(leftDiff < rightDiff) hi = m2;
			else lo = m1;
		}

		Vec mirrorPt = mirror.from.add(mirror.dir.unit().scale(lo));
		double diff = go(lo);
		if(diff > 1e-6) {
			out.println("NO");
			return;
		}

		if(!mirror.containsPoint(mirrorPt)) {
			out.println("NO");
			return;
		}
		Seg meMirror = new Seg(me, mirrorPt);
		Seg otherMirror = new Seg(other, mirrorPt);
		if(meMirror.intersects(wall, true) || otherMirror.intersects(wall, true)) {
			out.println("NO");
			return;
		}
		out.println("YES");
	}

	public void run() {
		System.err.println("go!");
		FS in = new FS();
		PrintWriter out = new PrintWriter(System.out);
		solve(in, out);
		out.close();
	}

	static class Vec {
		static final double EPS=1e-6;
		double x, y;

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

		public Vec add(Vec o) {
			return new Vec(x+o.x, y+o.y);
		}

		public Vec sub(Vec o) {
			return new Vec(x-o.x, y-o.y);
		}

		public Vec scale(double s) {
			return new Vec(x*s, y*s);
		}

		public double dot(Vec o) {
			return x*o.x+y*o.y;
		}

		public double cross(Vec o) {
			return x*o.y-y*o.x;
		}

		public double mag2() {
			return dot(this);
		}

		public double mag() {
			return Math.sqrt(mag2());
		}

		public Vec unit() {
			return scale(1/mag());
		}

		public Vec rot90() {
			return new Vec(-y, x);
		}

		public Vec rot270() {
			return new Vec(y, -x);
		}

		public Vec rotate(double theta) {
			double PI=Math.PI;
			double newX=x*Math.cos(theta)+y*Math.cos(PI/2+theta);
			double newY=x*Math.sin(theta)+y*Math.sin(PI/2+theta);
			return new Vec(newX, newY);
		}

		//angle between 0 and 2PI
		public double angle() {
			return (Math.atan2(y, x)+2*Math.PI)%(2*Math.PI);
		}

		public String toString() {
			DecimalFormat df=new DecimalFormat("#.##");
			return "("+df.format(x)+", "+df.format(y)+")";
		}

		static boolean eq(double a, double b) {
			return Math.abs(a-b)<EPS;
		}

		static boolean leq(double a, double b) {
			return a-EPS<b;
		}

		static boolean geq(double a, double b) {
			return a+EPS>b;
		}

		public boolean equals(Object oo) {
			Vec o=(Vec)oo;
			return eq(x, o.x)&&eq(y, o.y);
		}
	}

	static class Seg {
		Vec from, to, dir;

		public Seg(Vec from, Vec to) {
			this.from=from;
			this.to=to;
			dir=to.sub(from);
		}

		//line-line intersection
		public Vec lineIntersect(Seg o) {
			double det=o.dir.x*dir.y-dir.x*o.dir.y;
			if (Vec.eq(det, 0)) return null;
			double dist=(o.dir.x*(o.from.y-from.y)-
					o.dir.y*(o.from.x-from.x))/det;
			return from.add(dir.scale(dist));
		}

		public boolean containsPoint(Vec o) {
			double distFromLine=dir.unit().cross(o.sub(from));
			if (!Vec.eq(distFromLine, 0)) return false;
			return Vec.eq(dir.mag(), from.sub(o).mag()+to.sub(o).mag());
		}

		//seg-seg intersection
		public Vec segIntersection(Seg o) {
			Vec intersect=lineIntersect(o);
			return containsPoint(intersect)&&o.containsPoint(intersect)?intersect:null;
		}

		//returns 1 if above, 0 if on, -1 if below
		public int side(Vec o) {
			Vec oDir=o.sub(from);
			double distFromLine=dir.unit().cross(oDir);
			if (Vec.eq(distFromLine, 0))
				return 0;
			return (int)Math.signum(distFromLine);
		}

		public boolean intersects(Seg o, boolean isWall) {
			if(isWall && (containsPoint(o.from) || containsPoint(o.to))) return true;
			return side(o.from)!=side(o.to) && o.side(from)!=o.side(to);
		}

		public Vec getClosestTo(Vec o) {
			double percentThere=o.sub(from).dot(dir)/dir.mag2();
			return from.add(dir.scale(Math.max(0, Math.min(1, percentThere))));
		}

		public Vec projectToLine(Vec o) {
			return dir.scale(o.sub(from).dot(dir)/dir.mag2()).add(from);
		}

		//toContain must be a point with positive x and y coordinates.
		//this method returns the shortest line segment from the x-axis to the point to the y axis
		static Seg getShortestSegFromAxesContainingQ1Point(Vec toContain) {
			double slope=-Math.pow(toContain.y/toContain.x, 1.0/3);
			double b=toContain.y-toContain.x*slope;
			double xInt=-b/slope;
			return new Seg(new Vec(0, b), new Vec(xInt, 0));
		}

		public String toString() {
			return from+" -> "+to;
		}
	}

	public static void main(String[] args) {
		new Thread(null, new b(), "lmao", 1L<<28).start();
	}
	static class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreElements()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch(Exception e) {}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}


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

public class F implements Runnable{
	public static void main (String[] args) {new Thread(null, new F(), "_cf", 1 << 28).start();}

	public void run() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);

		int oo = (int)2e9;
		int n = fs.nextInt();
		int k = fs.nextInt();
		int[] dp = new int[n + 1], tdp = new int[n + 1];
		Arrays.fill(dp, oo);
		dp[0] = 0;
		while(k-->0) {
			int l = fs.nextInt(), r = fs.nextInt(), len = r - l;
			for(int i = 0; i <= n; i++) tdp[i] = dp[i];
			ArrayDeque<Integer> minQueue = new ArrayDeque<>();
			for(int i = 0; i <= n; i++) {
				push(minQueue, i, dp);
				tdp[i] = Math.min(tdp[i], best(minQueue, dp) + 2);
				if(r - i >= 0 && r - i <= n) tdp[r - i] = Math.min(tdp[r - i], best(minQueue, dp) + 1);
				pop(minQueue, i - len);
			}
			for(int i = 0; i <= n; i++) dp[i] = tdp[i];
		}

		if(dp[n] >= oo) out.println("Hungry");
		else out.printf("Full\n%d\n", dp[n]);

		out.close();
	}

	void pop(ArrayDeque<Integer> minQueue, int idx) {
		if(!minQueue.isEmpty() && minQueue.peekFirst() == idx) minQueue.pollFirst();
	}

	int best(ArrayDeque<Integer> minQueue, int[] dp) {
		if(minQueue.isEmpty()) return (int)2e9;
		return dp[minQueue.peekFirst()];
	}

	void push(ArrayDeque<Integer> minQueue, int p, int[] dp) {
		while(!minQueue.isEmpty() && dp[minQueue.getLast()] >= dp[p]) minQueue.pollLast();
		minQueue.addLast(p);
	}

	/*
	 * dp[i][j] means the minimum number of moves to cook the cutlet on one side
	   for j seconds after processing i intervals (do iterative space saving)
	 * The length of the interval is known and so we'll build up time j with the
	   previous length values (including j) all from the previous state. It'll take
	   an extra 2 flips to so:
	   if we know the number of flips to get the cutlet to exactly t seconds and we
	   want to get it to j seconds in the current interval being processed, then we'll
	   need to flip it after it gets to t seconds in the other interval (to prevent overcooking)
	   and then flip it again when it needs to cook in our interval to get it to the desired j.
	 * There's also a case where we can just flip it once based off of the previous states.
	   The main idea for some time j, is we want the cutlet to get to its jth second of cooking
	   during our current interval (so we can do a flip if necessary). So what happens is we take
	   the min of the dp values that are allowed in our current range and use that value to calculate
	   (right - j)'s best value by taking that minimum and I guess not flipping it and instead letting
	   it cook. Still a bit hazy but it makes sense when doing the second sample by hand (especially
	   when we update times 10 and 8).
	 * Definitely had to study someone else's solution because the editorial is very obscure and
	   doesn't actually explain the important part of the problem (how to derive the +1 and +2 jumps).
	 */

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				//                br = new BufferedReader(new FileReader("testdata.out"));
				st = new StringTokenizer("");
			} catch (Exception e){e.printStackTrace();}
		}
		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}
		public int nextInt() {return Integer.parseInt(next());}
		public long nextLong() {return Long.parseLong(next());}
		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			try {line = br.readLine();}
			catch (Exception e) {e.printStackTrace();}
			return line;
		}
		public Integer[] nextIntegerArray(int n) {
			Integer[] a = new Integer[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}
		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}
		public char[] nextCharArray() {return nextLine().toCharArray();}
	}

}