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

public class Main {

    private static final int M = (int)1e9 + 7;
    private long[] fact, invfact;

    public Main(FastScanner in, PrintWriter out, int test) {
        int X = in.nextInt();
        int N = in.nextInt();
        boolean[] A = new boolean[201];
        for (int i = 0; i < N; i++) {
            int a = in.nextInt();
            A[a] = true;
        }
        int diff = 200, res = 0;
        for (int i = 0; i <= 200; i++) {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        }
        out.println(res);
    }

    private void calcFact(int N) {
        fact = new long[N];
        invfact = new long[N];

        fact[0] = 1;
        for (int i = 1; i < N; i++)
            fact[i] = fact[i - 1] * i % M;

        invfact[0] = 1;
        for (int i = 1; i < N; i++) {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        }
    }

    private long pow(int x, int p) {
        long res = 1, a = x;
        while (p > 1) {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        }
        res  = res * a % M;
        return res;
    }

    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        // Scanner in = new Scanner(
                // new BufferedReader(new InputStreamReader(System.in)));
        FastScanner in = new FastScanner(System.in);

        // int T = in.nextInt();
        for (int t = 1; t <= 1; t++) {
            Main sol = new Main(in, out, t);
        }

        out.close();
    }
}


class FastScanner{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public FastScanner(InputStream stream)
    {
        this.stream = stream;
    }

    int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    boolean isSpaceChar(int c)
    {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    }

    boolean isEndline(int c)
    {
        return c=='\n'||c=='\r'||c==-1;
    }

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

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

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

    String next(){
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    }

    String nextLine(){
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {

    private static final int M = (int)1e9 + 7;
    private long[] fact, invfact;

    public Main(FastScanner in, PrintWriter out, int test) {
        int X = in.nextInt();
        int N = in.nextInt();
        boolean[] A = new boolean[201];
        for (int i = 0; i < N; i++) {
            int a = in.nextInt();
            A[a] = true;
        }
        int diff = 200, res = 0;
        for (int i = 0; i <= 200; i++) {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        }
        out.println(res);
    }

    private void calcFact(int N) {
        fact = new long[N];
        invfact = new long[N];

        fact[0] = 1;
        for (int i = 1; i < N; i++)
            fact[i] = fact[i - 1] * i % M;

        invfact[0] = 1;
        for (int i = 1; i < N; i++) {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        }
    }

    private long pow(int x, int p) {
        long res = 1, a = x;
        while (p > 1) {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        }
        res  = res * a % M;
        return res;
    }

    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        // Scanner in = new Scanner(
                // new BufferedReader(new InputStreamReader(System.in)));
        FastScanner in = new FastScanner(System.in);

        // int T = in.nextInt();
        for (int t = 1; t <= 1; t++) {
            Main sol = new Main(in, out, t);
        }

        out.close();
    }
} Main private static final int M = (int)1e9 + 7; M (int)1e9 + 7 (int)1e9 7 private long[] fact fact invfact; invfact public Main(FastScanner in, PrintWriter out, int test) {
        int X = in.nextInt();
        int N = in.nextInt();
        boolean[] A = new boolean[201];
        for (int i = 0; i < N; i++) {
            int a = in.nextInt();
            A[a] = true;
        }
        int diff = 200, res = 0;
        for (int i = 0; i <= 200; i++) {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        }
        out.println(res);
    } Main {
        int X = in.nextInt();
        int N = in.nextInt();
        boolean[] A = new boolean[201];
        for (int i = 0; i < N; i++) {
            int a = in.nextInt();
            A[a] = true;
        }
        int diff = 200, res = 0;
        for (int i = 0; i <= 200; i++) {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        }
        out.println(res);
    } int X = in.nextInt(); X in.nextInt() in.nextInt in int N = in.nextInt(); N in.nextInt() in.nextInt in boolean[] A = new boolean[201]; A new boolean[201] 201 for (int i = 0; i < N; i++) {
            int a = in.nextInt();
            A[a] = true;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int a = in.nextInt();
            A[a] = true;
        } {
            int a = in.nextInt();
            A[a] = true;
        } int a = in.nextInt(); a in.nextInt() in.nextInt in A[a] = true A[a] A a true int diff = 200 diff 200 res = 0; res 0 for (int i = 0; i <= 200; i++) {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        } int i = 0; int i = 0; i 0 i <= 200 i 200 i++ i++ i {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        } {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        } if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            } !A[i] && Math.abs(i - X) < diff !A[i] A[i] A i Math.abs(i - X) < diff Math.abs(i - X) Math.abs Math i - X i X diff {
                res = i;
                diff = Math.abs(i - X);
            } res = i res i diff = Math.abs(i - X) diff Math.abs(i - X) Math.abs Math i - X i X out.println(res) out.println out res FastScanner in in PrintWriter out out int test test private void calcFact(int N) {
        fact = new long[N];
        invfact = new long[N];

        fact[0] = 1;
        for (int i = 1; i < N; i++)
            fact[i] = fact[i - 1] * i % M;

        invfact[0] = 1;
        for (int i = 1; i < N; i++) {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        }
    } calcFact {
        fact = new long[N];
        invfact = new long[N];

        fact[0] = 1;
        for (int i = 1; i < N; i++)
            fact[i] = fact[i - 1] * i % M;

        invfact[0] = 1;
        for (int i = 1; i < N; i++) {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        }
    } fact = new long[N] fact new long[N] N invfact = new long[N] invfact new long[N] N fact[0] = 1 fact[0] fact 0 1 for (int i = 1; i < N; i++)
            fact[i] = fact[i - 1] * i % M; int i = 1; int i = 1; i 1 i < N i N i++ i++ i fact[i] = fact[i - 1] * i % M; fact[i] = fact[i - 1] * i % M fact[i] fact i fact[i - 1] * i % M fact[i - 1] * i fact[i - 1] fact i - 1 i 1 i M invfact[0] = 1 invfact[0] invfact 0 1 for (int i = 1; i < N; i++) {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        } {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        } long p = pow(i, M - 2); p pow(i, M - 2) pow i M - 2 M 2 invfact[i] = invfact[i - 1] * p % M invfact[i] invfact i invfact[i - 1] * p % M invfact[i - 1] * p invfact[i - 1] invfact i - 1 i 1 p M int N N private long pow(int x, int p) {
        long res = 1, a = x;
        while (p > 1) {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        }
        res  = res * a % M;
        return res;
    } pow {
        long res = 1, a = x;
        while (p > 1) {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        }
        res  = res * a % M;
        return res;
    } long res = 1 res 1 a = x; a x while (p > 1) {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        } p > 1 p 1 {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        } if (p % 2 == 1)
                res = res * a % M; p % 2 == 1 p % 2 p 2 1 res = res * a % M res res * a % M res * a res a M a = a * a % M a a * a % M a * a a a M p /= 2 p 2 res  = res * a % M res res * a % M res * a res a M return res; res int x x int p p public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        // Scanner in = new Scanner(
                // new BufferedReader(new InputStreamReader(System.in)));
        FastScanner in = new FastScanner(System.in);

        // int T = in.nextInt();
        for (int t = 1; t <= 1; t++) {
            Main sol = new Main(in, out, t);
        }

        out.close();
    } main {
        PrintWriter out = new PrintWriter(System.out);
        // Scanner in = new Scanner(
                // new BufferedReader(new InputStreamReader(System.in)));
        FastScanner in = new FastScanner(System.in);

        // int T = in.nextInt();
        for (int t = 1; t <= 1; t++) {
            Main sol = new Main(in, out, t);
        }

        out.close();
    } PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) FastScanner in = new FastScanner(System.in); in new FastScanner(System.in) for (int t = 1; t <= 1; t++) {
            Main sol = new Main(in, out, t);
        } int t = 1; int t = 1; t 1 t <= 1 t 1 t++ t++ t {
            Main sol = new Main(in, out, t);
        } {
            Main sol = new Main(in, out, t);
        } Main sol = new Main(in, out, t); sol new Main(in, out, t) out.close() out.close out String[] args args class FastScanner{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public FastScanner(InputStream stream)
    {
        this.stream = stream;
    }

    int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    boolean isSpaceChar(int c)
    {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    }

    boolean isEndline(int c)
    {
        return c=='\n'||c=='\r'||c==-1;
    }

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

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

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

    String next(){
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    }

    String nextLine(){
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    }
} FastScanner private InputStream stream; stream private byte[] buf = new byte[1024]; buf new byte[1024] 1024 private int curChar; curChar private int numChars; numChars public FastScanner(InputStream stream)
    {
        this.stream = stream;
    } FastScanner {
        this.stream = stream;
    } this.stream = stream this.stream this this.stream stream InputStream stream stream int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    } read {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    } if (numChars == -1)
            throw new InputMismatchException(); numChars == -1 numChars -1 1 throw new InputMismatchException(); new InputMismatchException() if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        } curChar >= numChars curChar numChars {
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        } curChar = 0 curChar 0 try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            } catch (IOException e) {
                throw new InputMismatchException();
            } IOException e {
                throw new InputMismatchException();
            } throw new InputMismatchException(); new InputMismatchException() {
                numChars = stream.read(buf);
            } numChars = stream.read(buf) numChars stream.read(buf) stream.read stream buf if (numChars <= 0)
                return -1; numChars <= 0 numChars 0 return -1; -1 1 return buf[curChar++]; buf[curChar++] buf curChar++ curChar boolean isSpaceChar(int c)
    {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    } isSpaceChar {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    } return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1; c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1 c=='\t' c=='\r' c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1 c==' ' c ' ' c=='\n' c '\n' c=='\r' c '\r' c=='\t' c '\t' c==-1 c -1 1 int c c boolean isEndline(int c)
    {
        return c=='\n'||c=='\r'||c==-1;
    } isEndline {
        return c=='\n'||c=='\r'||c==-1;
    } return c=='\n'||c=='\r'||c==-1; c=='\n'||c=='\r'||c==-1 c=='\n'||c=='\r'||c==-1 c=='\n' c '\n' c=='\r' c '\r' c==-1 c -1 1 int c c int nextInt()
    {
        return Integer.parseInt(next());
    } nextInt {
        return Integer.parseInt(next());
    } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong()
    {
        return Long.parseLong(next());
    } nextLong {
        return Long.parseLong(next());
    } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble()
    {
        return Double.parseDouble(next());
    } nextDouble {
        return Double.parseDouble(next());
    } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String next(){
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    } next {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    } int c = read(); c read() read while (isSpaceChar(c))
            c = read(); isSpaceChar(c) isSpaceChar c c = read() c read() read StringBuilder res = new StringBuilder(); res new StringBuilder() do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c)); !isSpaceChar(c) isSpaceChar(c) isSpaceChar c {
            res.appendCodePoint(c);
            c = read();
        } res.appendCodePoint(c) res.appendCodePoint res c c = read() c read() read return res.toString(); res.toString() res.toString res String nextLine(){
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    } nextLine {
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    } int c = read(); c read() read while (isEndline(c))
            c = read(); isEndline(c) isEndline c c = read() c read() read StringBuilder res = new StringBuilder(); res new StringBuilder() do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c)); !isEndline(c) isEndline(c) isEndline c {
            res.appendCodePoint(c);
            c = read();
        } res.appendCodePoint(c) res.appendCodePoint res c c = read() c read() read return res.toString(); res.toString() res.toString res public class Main {

    private static final int M = (int)1e9 + 7;
    private long[] fact, invfact;

    public Main(FastScanner in, PrintWriter out, int test) {
        int X = in.nextInt();
        int N = in.nextInt();
        boolean[] A = new boolean[201];
        for (int i = 0; i < N; i++) {
            int a = in.nextInt();
            A[a] = true;
        }
        int diff = 200, res = 0;
        for (int i = 0; i <= 200; i++) {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        }
        out.println(res);
    }

    private void calcFact(int N) {
        fact = new long[N];
        invfact = new long[N];

        fact[0] = 1;
        for (int i = 1; i < N; i++)
            fact[i] = fact[i - 1] * i % M;

        invfact[0] = 1;
        for (int i = 1; i < N; i++) {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        }
    }

    private long pow(int x, int p) {
        long res = 1, a = x;
        while (p > 1) {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        }
        res  = res * a % M;
        return res;
    }

    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        // Scanner in = new Scanner(
                // new BufferedReader(new InputStreamReader(System.in)));
        FastScanner in = new FastScanner(System.in);

        // int T = in.nextInt();
        for (int t = 1; t <= 1; t++) {
            Main sol = new Main(in, out, t);
        }

        out.close();
    }
} public class Main {

    private static final int M = (int)1e9 + 7;
    private long[] fact, invfact;

    public Main(FastScanner in, PrintWriter out, int test) {
        int X = in.nextInt();
        int N = in.nextInt();
        boolean[] A = new boolean[201];
        for (int i = 0; i < N; i++) {
            int a = in.nextInt();
            A[a] = true;
        }
        int diff = 200, res = 0;
        for (int i = 0; i <= 200; i++) {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        }
        out.println(res);
    }

    private void calcFact(int N) {
        fact = new long[N];
        invfact = new long[N];

        fact[0] = 1;
        for (int i = 1; i < N; i++)
            fact[i] = fact[i - 1] * i % M;

        invfact[0] = 1;
        for (int i = 1; i < N; i++) {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        }
    }

    private long pow(int x, int p) {
        long res = 1, a = x;
        while (p > 1) {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        }
        res  = res * a % M;
        return res;
    }

    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        // Scanner in = new Scanner(
                // new BufferedReader(new InputStreamReader(System.in)));
        FastScanner in = new FastScanner(System.in);

        // int T = in.nextInt();
        for (int t = 1; t <= 1; t++) {
            Main sol = new Main(in, out, t);
        }

        out.close();
    }
} Main
import java.util.*;
import java.io.*;

public class Main {

    private static final int M = (int)1e9 + 7;
    private long[] fact, invfact;

    public Main(FastScanner in, PrintWriter out, int test) {
        int X = in.nextInt();
        int N = in.nextInt();
        boolean[] A = new boolean[201];
        for (int i = 0; i < N; i++) {
            int a = in.nextInt();
            A[a] = true;
        }
        int diff = 200, res = 0;
        for (int i = 0; i <= 200; i++) {
            if (!A[i] && Math.abs(i - X) < diff) {
                res = i;
                diff = Math.abs(i - X);
            }
        }
        out.println(res);
    }

    private void calcFact(int N) {
        fact = new long[N];
        invfact = new long[N];

        fact[0] = 1;
        for (int i = 1; i < N; i++)
            fact[i] = fact[i - 1] * i % M;

        invfact[0] = 1;
        for (int i = 1; i < N; i++) {
            long p = pow(i, M - 2);
            invfact[i] = invfact[i - 1] * p % M;
        }
    }

    private long pow(int x, int p) {
        long res = 1, a = x;
        while (p > 1) {
            if (p % 2 == 1)
                res = res * a % M;

            a = a * a % M;
            p /= 2;
        }
        res  = res * a % M;
        return res;
    }

    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        // Scanner in = new Scanner(
                // new BufferedReader(new InputStreamReader(System.in)));
        FastScanner in = new FastScanner(System.in);

        // int T = in.nextInt();
        for (int t = 1; t <= 1; t++) {
            Main sol = new Main(in, out, t);
        }

        out.close();
    }
}


class FastScanner{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public FastScanner(InputStream stream)
    {
        this.stream = stream;
    }

    int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    boolean isSpaceChar(int c)
    {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    }

    boolean isEndline(int c)
    {
        return c=='\n'||c=='\r'||c==-1;
    }

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

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

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

    String next(){
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    }

    String nextLine(){
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    }
}