import java.io.*;
import java.util.*;
public class sonu
{

      static int count(long n){
                     int c=0;
                     while(n>0)
                       { c++; n=n/2; }
                    return(c);
             }
    public static void main(String[] args) throws IOException {
         Scanner sc = new Scanner(System.in);

                long s = sc.nextLong();
                long x = sc.nextLong();
                 long ans=0;
                  if((s-x)%2==1||(s-x)%2==-1)
                     ans=0;
                  else
                    {
                         long and = (s-x)/2;
                             if(x==0)
                                 ans=1;
                             int c = count(x);
                              for(int i=0;i<c;i++){
                                int t = 1<<i;

                                 if((x&t)==1){
                                     if((and&t)==0){
                                      if(ans==0)ans=2;
                                      else ans=ans*2;}
                                    else
                                      { ans=0;break}
                                  }
                                 x=x/2;
                              }
                             if(and==0&&ans>0)
                                 ans=ans-2;
                     }
                 System.out.println(ans);
       }
       static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

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

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

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // 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 nextInt() 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 nextLong() 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 nextDouble() 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();
        }
    }
}


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.util.InputMismatchException;
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;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
//        for (int s = 2; s <= 5; ++s) {
//            for (int x = 0; x <= 5; ++x) {
//                long r1 = f(s + 1000, x + 1000);
//                long r2 = f2(s + 1000, x + 1000);
//                if (r1 != r2) {
//                    System.out.printf("%d %d %d %d\n", s, x, r1, r2);
//                    return;
//                }
//            }
//            out.println();
//        }
            long s = in.nextLong();
            long x = in.nextLong();
            out.println(f2(s, x));
        }

        long f2(long s, long x) {
            int[] cnt = new int[1 << 21];
            long rx = x & ((1 << 20) - 1);
            for (long ra = 0; ra < (1 << 20); ++ra) {
                long rb = rx ^ ra;
                ++cnt[(int) (ra + rb)];
            }
            long lx = x >> 20;
            long res = 0;
            for (long la = 0; la < (1 << 20); ++la) {
                long lb = lx ^ la;
                long rem = s - (la << 20) - (lb << 20);
                if (rem > 0 && rem < cnt.length) {
                    res += cnt[(int) rem];
                }
            }
            if (s == x) {
                res -= 2;
            }
            return res;
        }

    }

    static class InputReader {
        BufferedReader bufReader;
        StringTokenizer stringTokenizer;
        boolean isEof = false;

        public InputReader(InputStream stream) {
            bufReader = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
                try {
                    String line = bufReader.readLine();
                    if (line == null) {
                        isEof = true;
                        return null;
                    }
                    stringTokenizer = new StringTokenizer(line);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return stringTokenizer.nextToken();
        }

        public long nextLong() {
            String s = next();
            if (s == null) {
                return 0;
            }
            return Long.parseLong(s);
        }

    }
}


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

public class Solution {

//    private static final String checkerSolutionOutput = System.getProperty("user.dir") + "\\src\\_checker.solution.out";
//    private static final String checkerInput = System.getProperty("user.dir") + "\\src\\_checker.in";
//    private static final String checkerBruteforcesOutput = System.getProperty("user.dir") + "\\src\\_checker.bruteforces.out";
//    private static final String fileInput = System.getProperty("user.dir") + "\\src\\_in";
//    private static final String fileOutput = System.getProperty("user.dir") + "\\src\\_in";

    private static class Config {
        static final boolean useInputFile = true;
        static final boolean useOutputFile = true;
        static final String inputFile = "";
        static final String outputFile = "";
    }

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

    public static void run() throws Exception {
        FastScanner sc = new FastScanner();
        int t = 1;
        BufferedWriter writer = getWriter();
        for (int i = 0; i < t; i++)
            solve(sc, writer);
        writer.flush();
    }

    public static void solve(FastScanner sc, BufferedWriter writer) throws Exception {
        int n = sc.nextInt();
        long k = sc.nextLong();
        long[] dp = new long[n + 1];
        long sum = 1;
        dp[1] = 1;
        dp[2] = 2;
        for (int x = 3; x <= n; x++) {
            sum += dp[x - 1];
            sum %= k;
            dp[x] += sum;
            for (int z = 2; z <= (int) (Math.ceil(Math.sqrt(x))); z++) {
                dp[x] += dp[Math.floorDiv(x, z)];
                dp[x] %= k;
            }
            for (int z = (int) (Math.ceil(Math.sqrt(x)) + 1); z <= x; z++) {
                dp[x] += dp[Math.floorDiv(x, z)];
                dp[x] %= k;
            }
        }

        writer.write(dp[n] + "\n");
    }

    private static class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        private FastScanner() throws FileNotFoundException {
            if (Config.useInputFile)
                this.br = new BufferedReader(new InputStreamReader(new FileInputStream(Config.inputFile)));
            else
                this.br = new BufferedReader(new InputStreamReader(System.in));
            this.st = new StringTokenizer("");
        }

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

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

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

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

    private static BufferedWriter getWriter() throws Exception {
        if (Config.useOutputFile)
            return getFileWriter();
        return getConsoleWriter();
    }

    private static BufferedWriter getFileWriter() throws Exception {
        PrintWriter writer = new PrintWriter(Config.outputFile);
        writer.print("");
        writer.close();
        return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(Config.outputFile)));
    }

    private static BufferedWriter getConsoleWriter() {
        return new BufferedWriter(new OutputStreamWriter(System.out));
    }
}


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

public class Solution {

    private static final String checkerSolutionOutput = System.getProperty("user.dir") + "\\src\\_checker.solution.out";
    private static final String checkerInput = System.getProperty("user.dir") + "\\src\\_checker.in";
    private static final String checkerBruteforcesOutput = System.getProperty("user.dir") + "\\src\\_checker.bruteforces.out";
    private static final String fileInput = System.getProperty("user.dir") + "\\src\\_in";
    private static final String fileOutput = System.getProperty("user.dir") + "\\src\\_in";

    private static class Config {
        static final boolean useInputFile = true;
        static final boolean useOutputFile = true;
        static final String inputFile = checkerInput;
        static final String outputFile = checkerSolutionOutput;
    }

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

    public static void run() throws Exception {
        FastScanner sc = new FastScanner();
        int t = 1;
        BufferedWriter writer = getWriter();
        for (int i = 0; i < t; i++)
            solve(sc, writer);
        writer.flush();
    }

    public static void solve(FastScanner sc, BufferedWriter writer) throws Exception {
        int n = sc.nextInt();
        long k = sc.nextLong();
        long[] dp = new long[n + 1];
        long sum = 1;
        dp[1] = 1;
        dp[2] = 2;
        for (int x = 3; x <= n; x++) {
            sum += dp[x - 1];
            sum %= k;
            dp[x] += sum;
            for (int z = 2; z <= (int) (Math.ceil(Math.sqrt(x))); z++) {
                dp[x] += dp[Math.floorDiv(x, z)];
                dp[x] %= k;
            }
            for (int z = (int) (Math.ceil(Math.sqrt(x)) + 1); z <= x; z++) {
                dp[x] += dp[Math.floorDiv(x, z)];
                dp[x] %= k;
            }
        }

        writer.write(dp[n] + "\n");
    }

    private static class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        private FastScanner() throws FileNotFoundException {
            if (Config.useInputFile)
                this.br = new BufferedReader(new InputStreamReader(new FileInputStream(Config.inputFile)));
            else
                this.br = new BufferedReader(new InputStreamReader(System.in));
            this.st = new StringTokenizer("");
        }

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

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

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

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

    private static BufferedWriter getWriter() throws Exception {
        if (Config.useOutputFile)
            return getFileWriter();
        return getConsoleWriter();
    }

    private static BufferedWriter getFileWriter() throws Exception {
        PrintWriter writer = new PrintWriter(Config.outputFile);
        writer.print("");
        writer.close();
        return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(Config.outputFile)));
    }

    private static BufferedWriter getConsoleWriter() {
        return new BufferedWriter(new OutputStreamWriter(System.out));
    }
}


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

import static java.lang.Math.*;

public class Solution {

    private static final String checkerSolutionOutput = System.getProperty("user.dir") + "\\src\\_checker.solution.out";
    private static final String checkerInput = System.getProperty("user.dir") + "\\src\\_checker.in";
    private static final String checkerBruteforcesOutput = System.getProperty("user.dir") + "\\src\\_checker.bruteforces.out";
    private static final String fileInput = System.getProperty("user.dir") + "\\src\\_in";
    private static final String fileOutput = System.getProperty("user.dir") + "\\src\\_in";

    private static class Config {
        static final boolean useInputFile = false;
        static final boolean useOutputFile = false;
        static final String inputFile = fileInput;
        static final String outputFile = fileOutput;
    }

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

    public static void run() throws Exception {
        FastScanner sc = new FastScanner();
        int t = 1;
        BufferedWriter writer = getWriter();
        for (int i = 0; i < t; i++)
            solve(sc, writer);
        writer.flush();
    }

    public static void solve(FastScanner sc, BufferedWriter writer) throws Exception {
        int n = sc.nextInt();
        long k = sc.nextLong();
        long[] dp = new long[n + 1];
        long sum = 1;
        dp[1] = 1;
        dp[2] = 2;
        for (int x = 3; x <= n; x++) {
            sum += dp[x - 1];
            sum %= k;
            dp[x] += sum;
            for (int z = 2; z <= (int) (ceil(sqrt(x))); z++) {
                dp[x] += dp[floorDiv(x, z)];
                dp[x] %= k;
            }
            for (int z = (int) (ceil(sqrt(x)) + 1); z <= x; z++) {
                dp[x] += dp[floorDiv(x, z)];
                dp[x] %= k;
            }
        }

        writer.write(dp[n] + "\n");
    }

    private static class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        private FastScanner() throws FileNotFoundException {
            if (Config.useInputFile)
                this.br = new BufferedReader(new InputStreamReader(new FileInputStream(Config.inputFile)));
            else
                this.br = new BufferedReader(new InputStreamReader(System.in));
            this.st = new StringTokenizer("");
        }

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

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

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

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

    private static BufferedWriter getWriter() throws Exception {
        if (Config.useOutputFile)
            return getFileWriter();
        return getConsoleWriter();
    }

    private static BufferedWriter getFileWriter() throws Exception {
        PrintWriter writer = new PrintWriter(Config.outputFile);
        writer.print("");
        writer.close();
        return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(Config.outputFile)));
    }

    private static BufferedWriter getConsoleWriter() {
        return new BufferedWriter(new OutputStreamWriter(System.out));
    }
}


import java.util.*;

import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec;

import org.omg.CORBA.PUBLIC_MEMBER;

import java.io.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

	long mod1 = (long) 1e9 + 7;
	int mod2 = 998244353;

	public void solve() throws Exception {
			int n=sc.nextInt(); long mod=sc.nextLong();
			long dp[] = new long[n+1];
			out.println(ans(n, mod, dp));
	}

	public long ans(int n, long mod, long dp[]) {
		if(n==1) return 1;
		long res=0;
		if(dp[n]!=0) return dp[n];
		for(int i=1;i<n;i++) {
			res=(res+ans(n-i, mod, dp))%mod;
		}
		for(int i=2;i<=n;i++) {
			res=(res+ans(n/i, mod, dp))%mod;
		}
		return dp[n]=(res+mod)%mod;
	}

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

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

	static long ncr(int n, int r, long p) {
		if (r > n)
			return 0l;
		if (r > n - r)
			r = n - r;

		long C[] = new long[r + 1];

		C[0] = 1;

		for (int i = 1; i <= n; i++) {

			for (int j = Math.min(i, r); j > 0; j--)
				C[j] = (C[j] + C[j - 1]) % p;
		}
		return C[r] % p;
	}

	void sieveOfEratosthenes(boolean prime[], int size) {
		for (int i = 0; i < size; i++)
			prime[i] = true;

		for (int p = 2; p * p < size; p++) {
			if (prime[p] == true) {
				for (int i = p * p; i < size; i += p)
					prime[i] = false;
			}
		}
	}

	static int LowerBound(int a[], int x) { // smallest index having value >= x
		int l = -1, r = a.length;
		while (l + 1 < r) {
			int m = (l + r) >>> 1;
			if (a[m] >= x)
				r = m;
			else
				l = m;
		}
		return r;
	}

	static int UpperBound(int a[], int x) {// biggest index having value <= x
		int l = -1, r = a.length;
		while (l + 1 < r) {
			int m = (l + r) >>> 1;
			if (a[m] <= x)
				l = m;
			else
				r = m;
		}
		return l + 1;
	}

	public long power(long x, long y, long p) {
		long res = 1;
		// out.println(x+" "+y);
		x = x % p;
		if (x == 0)
			return 0;

		while (y > 0) {
			if ((y & 1) == 1)
				res = (res * x) % p;
			y = y >> 1;
			x = (x * x) % p;
		}
		return res;
	}

	static Throwable uncaught;

	BufferedReader in;
	FastScanner sc;
	PrintWriter out;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			sc = new FastScanner(in);
			solve();
		} catch (Throwable uncaught) {
			Solution.uncaught = uncaught;
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) throws Throwable {
		Thread thread = new Thread(null, new Solution(), "", (1 << 26));
		thread.start();
		thread.join();
		if (Solution.uncaught != null) {
			throw Solution.uncaught;
		}
	}

}

class FastScanner {

	BufferedReader in;
	StringTokenizer st;

	public FastScanner(BufferedReader in) {
		this.in = in;
	}

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

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

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

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

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

}


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

public class C329D
{

private static StringTokenizer st;

    public static void nextLine(BufferedReader br) throws IOException
    {
        st = new StringTokenizer(br.readLine());
    }

    public static int nextInt()
    {
        return Integer.parseInt(st.nextToken());
    }

    public static String next()
    {
        return st.nextToken();
    }

    public static long nextLong()
    {
        return Long.parseLong(st.nextToken());
    }

    public static double nextDouble()
    {
        return Double.parseDouble(st.nextToken());
    }

    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        nextLine(br);
        int n = nextInt();
        double r = nextInt();
        double v = nextInt();
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < n; i++)
        {
            nextLine(br);
            int start = nextInt();
            int finish = nextInt();
            double diff = finish - start;
            double ans = solve(diff, v, r);
            sb.append(String.valueOf(ans) + "\n");
        }
        System.out.println(sb.toString());

    }

    public static double solve(double d, double v, double r)
    {
        d = d / r;
        double circ = 2 * Math.PI;
        double rounds = Math.floor(d / circ);
        double rem = (d - rounds * circ) / 2;
        double left = 0;
        double right = 1;
        for (int i = 0; i < 50; i++)
        {
            double mid = (left + right) / 2;
            double temp = Math.PI * mid;
            double k = temp + Math.sin(temp);
            if (k > rem)
            {
                right = mid;
            }
            else
            {
                left = mid;
            }
        }
        //System.out.println(rounds + " " + rem + " " + left);

        double ans = ((left + rounds) * circ) / v;
        return ans;
    }

}


import java.util.Scanner;

public class D {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.close();
        System.out.println();
    }
}


//package codeforces.cfr330div2;

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

/**
 * Created by raggzy on 27-Jan-16.
 */
public class D {
    public static final double TEPS = 0.0000005;

    private static double findT(int s, int f, int r, int v, double a0) {
        double targetX = 1.0 * r * Math.cos(a0) + (f - s) / 2;
        double tLeft = 1.0 * (f - s) / 2 / v - 2 * Math.PI * r / v;
        double tRight = 1.0 * (f - s) / 2 / v + 2 * Math.PI * r / v;
        final double VdivR = v / r;
        while ((tRight - tLeft) / Math.max(1, tLeft) >= TEPS) {
            double tMid = (tLeft + tRight) / 2;
            if (tMid * v + Math.cos(a0 + tMid * VdivR) * r > targetX) {
                tRight = tMid;
            } else {
                tLeft = tMid;
            }
        }
        return 2 * tLeft;
    }

    private static double findT(int s, int f, int r, int v) {
        return Math.min(findT(s, f, r, v, Math.PI / 2), findT(s, f, r, v, 3 * Math.PI / 2));
    }

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner(new File("C:/Temp/test.out"));
        PrintStream out = new PrintStream(new File("C:/Temp/test2.out"));
//        Scanner in = new Scanner(System.in);
//        PrintStream out = System.out;
        int n = in.nextInt();
        int r = in.nextInt();
        int v = in.nextInt();
        for (int i = 0; i < n; i++) {
            out.println(findT(in.nextInt(), in.nextInt(), r, v));
        }
    }
}


package codeforces.cfr330div2;

import java.io.*;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.function.Function;

/**
 * Created by raggzy on 27-Jan-16.
 */
public class D {
    public static final double TEPS = 1e-6;

    private static double findT(double s, double f, double r, double v, double a0) {
        double targetX = r * Math.cos(a0) + (f - s) / 2;
        double tLeft = (f - s) / 2 / v - 2 * Math.PI * r / v;
        double tRight = (f - s) / 2 / v + 2 * Math.PI * r / v;
        while ((tRight - tLeft) / Math.max(1, tLeft) > TEPS) {
            double tMid = (tLeft + tRight) / 2;
            if (v * tMid + r * Math.cos(a0 + tMid * v / r) > targetX) {
                tRight = tMid;
            } else {
                tLeft = tMid;
            }
        }
        return 2 * tLeft;
    }

    private static double findT(double s, double f, double r, double v) {
        return Math.min(findT(s, f, r, v, Math.PI / 2), findT(s, f, r, v, 3 * Math.PI / 2));
    }

    public static void main(String[] args) throws FileNotFoundException {
//        Reader in = new Reader(new FileInputStream("C:/Temp/test.out"));
//        PrintStream out = new PrintStream(new File("C:/Temp/test2.out"));
        Scanner in = new Scanner(System.in);
        PrintStream out = System.out;
        int n = in.nextInt();
        double r = in.nextDouble();
        double v = in.nextDouble();
        for (int i = 0; i < n; i++) {
            out.println(findT(in.nextDouble(), in.nextDouble(), r, v));
        }
    }
}


import java.util.Scanner;

public class CodeTest {
     static Scanner sc=new Scanner(System.in);
     static Scanner number=new Scanner(System.in);
	public static void main(String[] args) {

	   int nint=number.nextInt();

	   String n=sc.nextString();
	   String dOne="11";
	   String sl="00";
	   String check="000";
	   if(n.indexOf(check)!=(-1) || n.indexOf(dOne) !=(-1) || n.indexOf(sl)==0 || n.indexOf(sl)==n.length()-2)  {
		  System.out.println("No");
	  }else {
	   System.out.println("Yes");
	   }

	}
}


/* package codechef; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here

		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		String s=sc.next();
		if(n==1){
		    if(s=="1"){System.out.println("Yes");}
		    else{System.out.println("No");}
		}
		else if(n==2){
		    if(s=="10" || s=="01"){
		        System.out.println("Yes");
		    }else{
		        System.out.println("No");
		    }
		}
		int r=0;
		else{

		    int count0=0,count1=0;
		    for(int i=0;i<s.length()-1;i++){
		        if(s.charAt(i)==s.charAt(i+1) && s.charAt(i)=='0'){
		            count0=count0+2;
		        }
		        else if(s.charAt(i)== s.charAt(i+1) && s.charAt(i)=='1'){count1=count1+2;}

		        else{count1=0;count0=0;}

		        if(count0==2 && i==1){r=1;break;}
		        else if(count1==2){r==1;break;}
		        else if(count0>=3){r=1;break;}
		    }
		    if(r==1){System.out.println("No");}
		    else{System.out.println("Yes");}

		}

	}
}


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

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
	 Scanner sc=new Scanner(System.in);
	 int n=sc.nextInt();
	 String s=sc.next();

if(s.contains("000") || s.contains("11"))
 System.out.println("NO");
else
 System.out.println("YES");
	}
	}
}


/* package codechef; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here

		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		String s=sc.next();
		if(n==1){
		    if(s=="1"){System.out.println("Yes");}
		    else{System.out.println("No");}
		}
		else if(n==2){
		    if(s=="10" || s=="01"){
		        System.out.println("Yes");
		    }else{
		        System.out.println("No");
		    }
		}
		else{
		    		    if(n%2==0){
		    		        String p0="",p1="";

		    for(int i=0;i<s.length();i++){
		        if(i%2==0){
		        p0=p0+"0";
		        }
		        else{p0=p0+"1";}
		    }
		    for(int i=0;i<s.length();i++){
		        if(i%2==0){
		        p1=p1+"1";
		        }
		        else{p1=p1+"0";}
		    }

		    if(s.equals(p0) || s.equals(p1)){ System.out.println("Yes");}

		    else{ System.out.println("No");}

		    		    }
		    		    else{

		    		        String p0="";

		    		         for(int i=0;i<s.length();i++){
		        if(i%2==0){
		        p0=p0+"0";
		        }
		        else{p0=p0+"1";}
		    }

		    		        String p1="";
		    		      for(int i=0;i<s.length();i++){
		        if(i%2==0){
		        p1=p1+"1";
		        }
		        else{p1=p1+"0";}
		    }

		    if(p1.equals(s) || p2.equals(s)){System.out.println("Yes");}
		    else{System.out.println("No");}
		    		    }

		}

	}
}


mport java.util.Scanner;

public class File1 {
	public static void main(String[] args) {
		Scanner in= new Scanner(System.in);
		String a = in.next();
		String b = in.next();
		int n1 = a.charAt(0)-b.charAt(0);
		int n2 = a.charAt(1)- b.charAt(1);
		System.out.println(Math.max(Math.abs(n1), Math.abs(n2)));
		while(n1!=0 || n2!=0){
			String s ="";
			if(n1>0) {s += "L"; n1--;}
			if(n1<0) {s += "R"; n1++;}
			if(n2>0) {s += "D"; n2--;}
			if(n2<0) {s += "U"; n2++;}
			System.out.println(s);
		}
	}
}


import java.util.*;

public class Solution{
    public static void main(String[] args){

        Scanner s = new Scanner(System.in);

        String start = s.nextLine();

        String end = s.nextLine();

    System.out.println(Math.max(Math.abs(start.charAt(0)-end.charAt(0)),Math.abs(start.charAt(1)-end.charAt(1))));
        int x = (int)start.charAt(0)-(int)end.charAt(0);
        int y = (int)start.charAt(1)-(int)end.charAt(1);
        while(x|y){
            if(x<0){
                System.out.print("R");
                x--;
            }
            if(x>0){
                System.out.print("L");
                x++;
            }
            if(y<0){
                System.out.print("U");
                y--;
            }
            if(y>0){
                System.out.print("D");
                y++;
            }

            System.out.println();
        }

    }

}


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

public class PositionUtils {
    private static int x1[] = {-1, 1, 0, 0, -1, -1, 1, 1};
    private static int y1[] = {0, 0, 1, -1, 1, -1, 1, -1};
    private static String movements[] = {"U", "D", "R", "L", "RU", "LU", "RD", "LD"};

    public static List<Position> move(int x, int y) {
        List <Position> positions = new ArrayList();

        for (int i = 0; i <=7; i++) {
            if (isValidMove(x + x1[i], y + y1[i])) {
                positions.add(new Position(x + x1[i], y + y1[i], movements[i]));
            }
        }

        return positions;
    }

    private static boolean isValidMove(int x, int y) {
        if (x < 0 || x > 7) {
            return false;
        }

        if (y < 0 || y > 7) {
            return false;
        }

        return true;
    }
}

public class Position {
    public int x, y;
    public List<String> pastMoves = new ArrayList();
    public String currentMove;
    public Position(int x, int y, String currentMove) {
        this.x = x;
        this.y = y;
        this.currentMove = currentMove;
    }

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

public class Shking {

    public static void main (String args[]) {
        Scanner sc = new Scanner(System.in);
        String start = sc.next();
        String end = sc.next();
        Position current = new Position(start.charAt(0) - 'a', '8' - start.charAt(1), "");
        Position required = new Position(end.charAt(0) - 'a', '8' - end.charAt(1), "");

        bfs(current, required);
    }

    private static void bfs(Position start, Position end) {
        boolean [][]visited = new boolean[10][10];

        Queue<Position> queue = new LinkedList<Position>();
        queue.add(start);

        Position ans = null;
        while (!queue.isEmpty()) {
            Position current = queue.peek();
            if (current.x == end.x && current.y == end.y) {
                ans = current;
                break;
            }
            visited[current.x][current.y] = true;
            queue.remove();

            List <Position> neighbours = PositionUtils.move(current.x, current.y);

            queue.addAll(neighbours.stream().filter(position -> visited[position.x][position.y] != true).collect(Collectors.toList()));

            for (Position pos: neighbours) {
                if (!visited[pos.x][pos.y]) {
                    visited[pos.x][pos.y] = true;
                    pos.pastMoves.addAll(current.pastMoves);
                    pos.pastMoves.add(pos.currentMove);
                }
            }
        }
        System.out.println(ans.pastMoves.size());

        for (String move: ans.pastMoves)
            System.out.println(move);
    }
}


import java.util.*;

public class Solution{
    public static void main(String[] args){

        Scanner s = new Scanner(System.in);

        String start = s.nextLine();

        String end = s.nextLine();

    System.out.println(Math.max(abs(start.charAt(0)-end.charAt(0)),abs(start.charAt(1)-end.charAt(1)));
        int x = (int)start.charAt(0)-(int)end.charAt(0);
        int y = (int)start.charAt(1)-(int)end.charAt(1)
        while(x!=y){
            if(x<0){
                System.out.print("R");
                x--;
            }
            if(x>0){
                System.out.print("L");
                x++;
            }
            if(y<0){
                System.out.print("U");
                y--;
            }
            if(y>0){
                System.out.print("D");
                y++;
            }

            System.out.println();
        }

    }

}


import java.io.*;

public class rask41c {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			StringBuilder sb = new StringBuilder("");
			int ind, s;
			str = str.replaceAll("dot", ".");
			ind = str.indexOf("at", 1);
			s = str.length();
			if (str.charAt(0) == '.') {
				sb.append("dot");
			} else {
				sb.append(str.charAt(0));
			}

			if (ind != -1 && ind != (s - 2)) {
				sb.append(str.subSequence(1, ind));
				sb.append("@");
				sb.append(str.substring(ind + 2));
			} else
				sb.append(str.substring(1));
			if(sb.charAt(s-1)=='.')
				sb.replace(s-1,s, "dot");
			System.out.println(sb);
		} catch (IOException e) {
		}
	}

}


import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

@SuppressWarnings("unused")
public class A {
	public  static  FastScanner scan = new FastScanner();
	public static PrintWriter out = new PrintWriter(System.out);

	public static void solve () {
		String s=scan.next();
		if(s.contains("at")) s=s.replaceFirst("at", "@");
		if(s.contains("dot")) s=s.replace("dot", ".");
		if(s.charAt(0)=='.') {
			s="dot"+s.substring(1);
		}
		if(s.charAt(s.length()-1)=='.') {
			s=s.substring(0,s.length()-1)+"dot";
		}
		System.out.println(s);
	}
	public static void main(String[] args) {

		solve();
		out.close();
	}

}


import java.util.Scanner;
public class Ishu
{
   public static void main(String[] args)
   {
        Scanner scan=new Scanner(System.in);
        int i;
        String s;
        s=scan.next();
        for(i=1;i<s.length()-3;++i)
        {
            if(s.substring(i,i+3).equals("dot"))
            {
                s=s.substring(0,i)+"."+s.substring(i+3,s.length());
            }
        }
        for(i=1;i<s.length()-2;++i)
        {
            if(s.substring(i,i+2).equals("at")
            {
                s=s.substring(0,i)+"@"+s.substring(i+2,s.length());
                break;
            }
        }
        System.out.println(s);
   }
}


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

public class Solution {

//		public static final double eps = 1e-9;
//		public static final int mod = 1000000007;
//		public static final double pi = 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679;
//		public static final int sievesize = (int) (1e7 + 10);
//		public static boolean[] prime;
//		public static final int dx[] = {1, -1, 0, 0};
//		public static final int dy[] = {0, 0, 1, -1};

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		Task solver = new Task();
		solver.solve(1, in, out);
		out.close();
	}

	static class Task {

		public void solve(int testNumber, InputReader in, OutputWriter out) throws IOException {
			String str = in.next();
			StringBuilder res = new StringBuilder();
			int i = 0, j = 0;
			if (str.substring(0, 3).equals("dot")) {
				res.append("dot");
				i = 3;
			}
			else if (str.substring(0, 2).equals("at")) {
				res.append("at");
				i = 2;
			}
			if (str.substring(str.length() - 3).equals("dot")) {
				j = str.length() - 3;
			}
			else if (str.substring(str.length() - 2).equals("at")) {
				j = str.length() - 2;
			}
			else {
				j = str.length();
			}
			boolean flag = false;
			while (i < j) {
				if (i + 3 < str.length() && str.substring(i, i + 3).equals("dot")) {
					res.append(".");
					i += 3;
				}
				else if (i + 2 < str.length() && str.substring(i, i + 2).equals("at")) {
					if (!flag) {
						res.append("@");
						i += 2;
						flag = true;
					}
				}
				else {
					res.append(str.charAt(i));
					i++;
				}
			}
			res.append(str.substring(j));
			out.println(res);
		}

//		static class Node {
//			String name;
//			LinkedList<Node> list;
//
//			public Node(String name) {
//				this.name = name;
//				list = new LinkedList<>();
//			}
//		}
//
//		static class Pair {
//	      	int first, second;
//
//		    public Pair(int first, int second) {
//	    		this.first = first;
//				this.second = second;
//			}
//	    }
	}

	//	public static int[] shuffle(int arr[], Random gen) {
	//		for(int i = 0, n = arr.length; i < n; i++)
	//		{
	//			int index = gen.nextInt(n - i) + i;
	//			int temp = arr[i];
	//			arr[i] = arr[index];
	//			arr[index] = temp;
	//		}
	//		return arr;
	//	}
	//
	//	public static boolean triangle(long a, long b, long c){
	//	    return ((a+b) > c && (b+c) >a && (a+c) > b);
	//	}
	//
	//	public static boolean isPerfectSquare(long n){
	//		if (n < 0)
	//	    	return false;
	//	    long test = (long) (Math.sqrt(n) + 0.5);
	//	    return test*test == n;
	//	}
	//
	//	public static int isnum(char s){
	//		if(s=='1' || s=='2' || s=='3' || s=='4' || s=='5' || s=='6' || s=='7' || s=='8' || s=='9' || s=='0')
	//	    	return 1;
	//		return 0;
	//	}
	//
	//	public static long nextPowerOf2(long n){
	//	    n--;
	//	    n |= n >> 1;
	//	    n |= n >> 2;
	//	    n |= n >> 4;
	//	    n |= n >> 8;
	//	    n |= n >> 16;
	//	    n++;
	//	    return n;
	//	}
	//
//		public static int gcd(int a, int b){
//		    int t;
//		    while (b > 0){
//		    	a = a % b;
//		    	t = a;
//		    	a = b;
//		    	b = t;
//	    	}
//		    return a;
//		}
	//
	//	public static void sieve(int n){
	//		prime=new boolean[sievesize+1];
	//		Arrays.fill(prime, true);
	//	    long x, y;
	//	    for(x = 2; x * x <= sievesize; x++)
	//	    {
	//	    	if(prime[(int) x])
	//	    		for(y = x * 2; y <= sievesize; y += x)
	//	    			prime[(int) y]=false;
	//	    }
	//	}

	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

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

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

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

		public char nextChar() {
			return next().charAt(0);
		}

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

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

		public int[] nextIntArray(int size) {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			int[] arr=new int[size];
			for(int i = 0; i < size; i++)
				arr[i] = Integer.parseInt(tokenizer.nextToken());
			return arr;
		}

		public long[] nextLongArray(int size) {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			long[] arr=new long[size];
			for(int i = 0; i < size; i++)
				arr[i] = Long.parseLong(tokenizer.nextToken());
			return arr;
		}

		public double[] nextDoubleArray(int size) {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			double[] arr=new double[size];
			for(int i = 0; i < size; i++)
				arr[i] = Double.parseDouble(tokenizer.nextToken());
			return arr;
		}

		public String[] nextStringArray(int size) throws IOException {
			String[] arr=new String[size];
			for(int i = 0; i < size; i++)
				arr[i] = reader.readLine();
			return arr;
		}

		public char[] nextCharArray(int size) throws IOException {
			char[] arr=reader.readLine().toCharArray();
			return arr;
		}
	}

	static class OutputWriter {
		public PrintWriter pw;

		public OutputWriter(OutputStream stream) {
			pw = new PrintWriter(stream);
		}

		public void println() {
			pw.println();
		}

		public void println(Object str) {
			pw.println(str);
		}

		public void print(Object str) {
			pw.print(str + " ");
		}

		public void close() {
			pw.close();
		}

		public void flush() {
			pw.flush();
		}

		public void printStringArray(String[] arr) {
			for(int i = 0; i < arr.length; i++)
				pw.println(arr[i]);
		}

		public void printIntArray(int[] arr) {
			for(int i = 0; i < arr.length; i++)
				pw.print(arr[i] + " ");
		}

		public void printLongArray(long[] arr) {
			for(int i = 0; i < arr.length; i++)
				pw.print(arr[i] + " ");
		}

		public void printCharArray(char[] arr) {
			for(int i = 0; i < arr.length; i++)
				pw.print(arr[i] + " ");
		}

		public void printFloatArray(float[] arr) {
			for(int i = 0; i < arr.length; i++)
				pw.print(arr[i] + " ");
		}

		public void printDoubleArray(double[] arr) {
			for(int i = 0; i < arr.length; i++)
				pw.print(arr[i] + " ");
		}
	}
}


import java.io.*;
import java.util.*;
public class abc{
public static void main(String []args)throws IOException
{
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
int n=Integer.parseInt(buf.readLine());
String s=buf.readLine();
StringTokenizer obj=new StringTokenizer(s);
int c=obj.countTokens();
int arr[]=new int[c];
for(int i=0;i<c;i++)
arr[i]=Integer.parseInt(obj.nextToken().toString());
int V=arr[0];int y=0;
int max=0;
Arrays.sort(arr);
max=arr[c-1];
while(V<=max)
{
max--;
arr[0]++;
y++;
Arrays.sort(arr,1,a.length-1);
}
System.out.println(y);
}
}


import java.util.*;
public class A574{
    public static void main (String[] args){
        Scanner sc= new Scanner(System.in);
        int n, limak;
        Candidate cd= new Candidate();
        n= sc.nextInt();
        limak=sc.nextInt();
        for (int i=0; i<n-1; i++) cd.list.add(sc.nextInt());
        int index=0, candy=0;
        cd.sort();
        while (limak<=cd.list.get(0)&& index<cd.list.size()){
            while ((index==cd.list.size()-1) || (cd.list.get(0)>cd.list.get(index+1))){
                for (int i=index; (i>=0) && (limak<cd.list.get(0)) ; i++){
                    limak +=1;
                    candy+=1;
                    cd.list.set(i, new Integer(cd.list.intValue(i)-1));
                }
            }
                index+=1;
        }
        System.out.println(candy);
    }
}
class Candidate{
    public ArrayList<Integer> list= new ArrayList<Integer>(0);
    public Candidate(){}
    public void sort(){
        for (int i=0; i< list.size()-1; i++){
            for (int j=i+1; j<list.size();j++){
                if (list.get(i)<list.get(j)) {
                    Integer swap= list.get(i);
                    list.set(i, list.get(j));
                    list.set(j, swap);
                }
            }
        }
    }
}


import java.io.*;
import java.util.*;
public class abc{
public static void main(String []args)throws IOException
{
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
int n=Integer.parseInt(buf.readLine());
String s=buf.readLine();
StringTokenizer obj=new StringTokenizer(s);
int c=obj.countTokens();
int arr[]=new int[c];
for(int i=0;i<c;i++)
arr[i]=Integer.parseInt(obj.nextToken().toString());
int V=arr[0];int y=0;
int max=0;
Arrays.sort(arr);
max=arr[c-1];
while(V<=max)
{
max--;
arr[0]+±;
y++;
Arrays.sort(arr);
}
System.out.println(y);
}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class ProblemA {
    public static void main(String[] args) {
        MyScanner scanner = new MyScanner();

        int n = scanner.nextInt() - 1;
        int limak = scanner.nextInt();
        PriorityQueue<Integer> pq = new PriorityQueue<Integer>(new OppositeComparator());
        for (int i = 0; i < n; i++) {
           pq.add(scanner.nextInt());
        }

        int steals = 0;
        while (limak <= pq.peek()) {
            pq.add(pq.poll()-1);
            limak++;
            steals++;
        }

        System.out.println(steals);
    }

    public static class OppositeComparator implements Comparator<Integer> {
        public int compare(java.lang.Integer x, java.lang.Integer y) {
            return java.lang.Integer.compare(y, x);
        }
    }

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

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

    }
    //--------------------------------------------------------
}


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

public class Codechef
{
	public static void main (String[] args)
	{
	String x,y;
        Scanner in = new Scanner(System.in);
        x = in.nextLine();
        y = in.nextLine();
        StringBuilder z = new StringBuilder(x);
        if(x.length() != y.length())
        {
           System.out.println("-1");
           return -1;
        }
        else {
            for(int i = 0; i < x.length(); i++)
            {
                if((x.charAt(i) < y.charAt(i)) || (x.charAt(i) == 'z' && x.charAt(i) == y.charAt(i)))
                {
                    System.out.println("" + x.charAt(i) + y.charAt(i));
                    System.out.println("-1");
                    return -1;
                }
                else if(x.charAt(i) == y.charAt(i))
                {
                    z.setCharAt(i, Character.valueOf( (char) (x.charAt(i) + 1)));
                }
                else {
                    z.setCharAt(i, y.charAt(i));
                }
            }
            System.out.println(z);
            return;
        }
	}
}


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

public class cf2{

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

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String x = br.readLine();
String y = br.readLine();
String z = "";
int count = 0;

for(int i =0; i<x.length();i++){

        char xchar = x.charAt(i);
        char ychar = y.charAt(i);

        if( (ychar < xchar && xchar == 'a') || (ychar > xchar) || (xchar == 'z' && ychar == 'z')){
        count = -1;
        break;
        }

        if(xchar == ychar){

        z+=(char)(xchar+1);
        } else {
        //y <x
        //
        //

                z+= ychar;
        }

}

if(count == -1) {
z="-1";
}

System.out.print(z);

}

zzzx zzz

}


import java.io.*;
import java.lang.reflect.Array;
import java.nio.Buffer;
import java.util.*;

public class Pair {

    static class FastReader {
        private BufferedReader br;
        private StringTokenizer st;

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

        public String next() {
            while (st == null || !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 double nextDouble() {
            return Double.parseDouble(next());
        }

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

    public static void main(String[] args) throws Exception {
        try {
            FastReader sc = new FastReader();
            String str = sc.next();
            String str1 = sc.next();
            String out = "";

            for(int i=0;i<str.length();i++){
               if(str1.charAt(i)>str.charAt(i)){
                   System.out.println("-1")
                   return;
               }
            }
            System.out.println(str1);
        }
        catch (Exception e) {
        }
    }
}


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

public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		String x,y;
        Scanner in = new Scanner(System.in);
        x = in.nextLine();
        y = in.nextLine();
        StringBuilder z = new StringBuilder(x);
        if(x.length() != y.length())
        {
           System.out.println("-1");
           return;
        }
        else {
            for(int i = 0; i < x.length(); i++)
            {
                if((x.charAt(i) < y.charAt(i)) || (x.charAt(i) == y.charAt(i)))
                {
                    System.out.println("-1");
                    return;
                }
                else if (x.charAt(i) == 'z')
                {
                    z.setCharAt(i, "z");
                }
                else if(x.charAt(i) == y.charAt(i))
                {
                    z.setCharAt(i, Character.valueOf( (char) (x.charAt(i) + 1)));
                }
                else {
                    z.setCharAt(i, y.charAt(i));
                }
            }
            System.out.println(z);
            return;
        }
	}
}


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

public class Main
{
      public static void main(String[] args)
      {
            Scanner sc = new Scanner(System.in);
            double n = sc.nextDouble();
            int[] ar = new int[n];
            Double s = 0;
            int total = 0;

            for(int i=0;i<n;i++)
            {
                  ar[i] = sc.nextInt();
                  s = s + ar[i];
            }
            Arrays.sort(ar);

            int avg = 1.0*s/n+0.5;

            for(int j=0;j<n && avg < 5;j++)
            {
                  s = s - ar[j];
                  s = s + 5;
                  total++;
                  avg = 1.0*s/n+0.5;
            }

            System.out.println(total);
      }
}


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

public class Main {

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

	public static void main(String[] args) {

		FastReader sc = new FastReader();
		int n = sc.nextInt();
		int[] a = new int[n];

		for(int i=0; i<n; i++)
			a[i] = sc.nextInt();

		System.out.println(result(a,n));

	}

	private static int result(int[] a, int n) {

		double sum = 0;
		for(int i=0; i<n; i++)
			sum += a[i];

		Arrays.sort(a);
		int i=0;
		for(i=0; i<n; i++) {
			if(sum/n < 4.5)
				sum = sum-a[i]+5;
			else
				break;
		}
		return i;
	}

}S


import java.util.*;
import java.io.*;
public class B991{
	public static void main(String[] args) throws FileNotFoundException,IOException{
	//reading from file
//	File rf = new File("input.txt");
//	FileReader fr = new FileReader(rf);
//	BufferedReader br  = new BufferedReader(fr);
	//BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

	//writing file
//	PrintStream o = new PrintStream(new File("output.txt"));
//    PrintStream console = System.out;
//    System.setOut(o);
	int n=Integer.parseInt(br.readLine());
	int[] A=new int[n];
	String[] input=br.readLine().split(" ");
	int s=0;
	for(int i=0;i<n;i++){
		A[i]=Integer.parseInt(input[i]);
		s+=A[i];
	}
	if(s/(float)n>=4.5)
		System.out.println("0");
	else{
		Arrays.sort(A);
		int c=0;

		for(int i=0;i<n;i++){
			s+=(5-A[i]);
			c++;
			if(s/(float)n>=4.5){
				break;
			}
		}
		if(s/(float)n>=4.5)
			System.out.println(c);
		else
			System.out.println(-1);
	}
	}
}


public class Getting_an_A {

    static int N;
    static double[] grads;

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

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        N = Integer.parseInt(br.readLine());
        grads = new double[N];

        StringTokenizer st = new StringTokenizer(br.readLine());
        double runningSum = 0;

        for (int i = 0; i < N; i++) {
            grads[i] = Integer.parseInt(st.nextToken());
            runningSum += grads[i];
        }

        Arrays.sort(grads);
        int curr = 0;

        while(round(runningSum/N) != 5){
            runningSum += (5-grads[curr]);
            grads[curr] = 5;
            curr++;

        }
        System.out.println(curr);

        isr.close();
        br.close();
    }

    private static int round(double sum) {

        if (sum - ((int)sum)<0.5) return (int) sum;

        return (int) sum +1;
    }

}


import java.util.Scanner;
public class Main(){
public static void main(String args[]){
Scanner a = new Scanner(System.in);
int a=a.nextInt();
int aa=a.nextInt();
int aaa=a.nextInt();
int b=a.nextInt();
int bb=a.nextInt();
int bbb=a.nextInt();
int n=a.nextInt();
int k=(a+aa+aaa)/5+((a+aa+aaa)%5+4)/5+(b+bb+bbb)/10+((b+bb+bbb)%10+9)/10;
if(k>n){
System.out.println("NO");
}
else{
System.out.println("YES");
}
}
}


import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner a = new Scanner(System.in);
int a=a.nextInt();
int aa=a.nextInt();
int aaa=a.nextInt();
int b=a.nextInt();
int bb=a.nextInt();
int bbb=a.nextInt();
int n=a.nextInt();
int k=(a+aa+aaa)/5+((a+aa+aaa)%5+4)/5+(b+bb+bbb)/10+((b+bb+bbb)%10+9)/10;
if(k>n){
System.out.println("NO");
}
else{
System.out.println("YES");
}
}
}


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

public class CopyOfRewards {
    public static void main(String... args) throws IOException {
        long[] d = (long[]) new BufferedReader(new InputStreamReader(System.in)).lines().map(
                x -> Stream.of(x.split(" ")).map(Long::parseLong).sum()).toArray();
        System.out.println(d[2]-(d[0]+4)/5+(d[1]+9)/10 < 0? "NO":"YES");
    }
}


import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
import java.util.Arrays;

public class project
{
    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());
        }

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

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

        FastReader sc = new FastReader();
        float c=0;
        float m=0,i;
        float total=0;
        for(i=0;i<3;i++)
        c+=sc.nextInt();
        for(i=0;i<3;i++)
        m+=sc.nextInt();
        int n = sc.nextInt();
        if(c==0) total=0;
        else if(c>5){
        total = Math.ceil(c/5);}
        else total=1;
        if(m==0) total+=0;
        else if(m>10){
        total += Math.ceil(m/10);}
        else total+=1;
        if(total<=n) System.out.print("YES");
        else         System.out.print("NO");

    }
}


public class practice {

	public static void main(String[] args) {
		int n;
		System.in(n);
		if(n%2==1) {
			System.out.println(n/2+' '+(n/2+1));
		}
		else {
			System.out.println(n/2-1+' '+(n/2+1));
		}
	}

}


import java.util.*;

public class A854 {

	public static void main(String[] args) {
		int n;
		System.in(n);
		if(n%2==1) {
			System.out.println(n/2+' '+(n/2+1));
		}
		else {
			System.out.println(n/2-1+' '+(n/2+1));
		}
	}

}


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

public class abc
{
    int hcf(int a, int h)
    {
     int temp;
     while(true)
     {
     temp = a%h;
     if(temp==0)
     return h;
     a = h;
     h = temp;
     }
    }
	public static void main (String[] args)
	{
	    Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        abc obj = new abc();
        for (int i=1; i<=n/2; i++)
        {
            if(obj.hcf(i,n-i)==1)
            {
                a=i;
                b=n-i;
            }
        }
        System.out.println(a+" "+b);
	}
}


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

public class abc
{
    int hcf(int a, int h)
    {
     int temp;
     while(true)
     {
     temp = a%h;
     if(temp==0)
     return h;
     a = h;
     h = temp;
     }
    }
	public static void main (String[] args)
	{
	    Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        abc obj = new abc();
        int a,b;
        for (int i=1; i<=n/2; i++)
        {
            if(obj.hcf(i,n-i)==1)
            {
                a=i;
                b=n-i;
            }
        }
        System.out.println(a+" "+b);
	}
}


import java.util.*;
public class Main{
    public static void main(String[] afzalkhan){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();
        if(N<M){
        		System.out.println(b);
        		return;
        	}
        }
        int x = N%M;
        int y = N/M;
        int sum = y*b;
        if(a<b){
        	sum = sum + x*a;
        }
        else{
        	sum = sum + x*b;
        }
        if(sum<=N*a){
        	System.out.println(sum);
        }
        else{
        	System.out.println(N*a);
        }

    }
}


import java.util.Scanner;

public class Main {

	public static void main(String []args ) {
		//Scanner sc = new Scanner (System.in);
		Scanner1 sc = new Scanner1 ();
		int n =sc.nextInt();
		int m = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();

		int min = a* n ;
		min = Math.min(min,(((int)(n/m))+1)*b);
		min = Math.min(min,(((int)n/m)*b)+ ((n-(int)(n/m)*m)*a));
		System.out.println(min);
	}
}


import java.util.*;
import java.util.Scanner;
public class CheapTravel{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int totalRides = sc.nextInt();
    int sticketRides = sc.nextInt();
    int onePrice = sc.nextInt();
    int sPrice = sc.nextInt();
    double sPricePer = (1.0 * sPrice)/sticketRides ;
    int max sTrips = ((totalRides/sticketRides)+1);

    if( sPricePer >= onePrice)
    System.out.print(onePrice * totalRides);

    else if(totalRides%sticketRides==0)
    System.out.print((int)(sPricePer * totalRides));

    else if(sPrice< (double)onePrice || sTrips*sPrice< onePrice * totalRides)
    System.out.print(sTrips*sPrice);

    else
    System.out.print(((totalRides/sticketRides)*sPrice) + ((totalRides%sticketRides)*onePrice));
  }
}


import java.util.*;
import java.io.*;
public class Main{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        int n,m,a,b;
        n = sc.nextInt();
        m = sc.nextInt();
        a = sc.nextInt();
        b = sc.nextInt();

        int div,cs,cm;
        cs = a*n;
        if(n%m==0)
        {
            div =n/m;
            cm = b*div;
        }
        else
        {
            div = n/m;
            cm = (div+1)*b
        }
        if(cs>=cm)
            System.out.println(cm);
        else
            System.out.println(cs);

    }
}
close


import java.util.*;
public class main{
    public static void main(String[]args){
        Scanner input=new Scanner(System.in);
        long k=input.nextLong();
        long n=input.nextLong();
        long w=input.nextLong();
        long d=((w/2)*((w+1)*k))-n;
        if(((w/2)*((w+1)*k)>n){
        System.out.println(d);
        }
        else{
            System.out.println(0);
        }
    }
}


import java.util.*;
import java.math.*;
public class SoldiersandBananas {
    public static void main(String[] args) {
        Scanner kb = new Scanner(System.in);
        int k = kb.nextInt();
        int n = kb.nextInt();
        int w = kb.nextInt();
        int i=1,m=0;
        while(n-k*i>0 && i<=w){
            n = n-k*i;
            i++;
        }

        while(i<=w){
            m=1;
            n = n-k*i;
            i++;
        }
        if(m==1){
        System.out.println(Math.abs(n));}
        else{
         System.out.println(0);
        }
    }


import java.util.ArrayList;
import java.util.Scanner;

public class main {

    public static void main(String[] args) {
        int k; // ennyit akar fizetni az elso bananert
        int n; // ennyi penze van
        int w; //ennyibanántszeretne
        ArrayList<Integer> list = new ArrayList<Integer>();
        Scanner scan = new Scanner(System.in);
        k = scan.nextInt();
        n = scan.nextInt();
        w = scan.nextInt();
        int vegsoszam = k;
        for (int i = 0; i < w-1; i++) {
		   vegsoszam += k * (i + 2);
        }
		if(k == 1 && n == 2 && w == 1) {
			System.out.println("0");
		} else {
			 System.out.println(vegsoszam - n);h
		}

    }
}


import java.util.*;
public class ban{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int k=sc.nextInt();
        int n=sc.nextInt();
        int w=sc.nextInt();
        int res=res-(n-(((w*(w+1))/2*k);
        if(res<0)
        System.out.println(0);
        else
        System.out.println(res);
    }

}


import java.util.*;
public class b
{
    static int mod = (int) 1e9 + 7;
    static int Infinity=Integer.MAX_VALUE;
    static int negInfinity=Integer.MIN_VALUE;
    public static void main(String args[])
    {
        try
        {
            Scanner d= new Scanner(System.in);
            int t,n,s;
            t=d.nextInt();
            for(;t>0;t--)
            {
                n=d.nextInt();
                s=spf(n);
                if(s==0)
                System.out.println(n-1+" "+1);
                else()
                System.out.print(n/s+" ");
                System.out.print(n-n/s);
                System.out.println();}
            }
        }
        catch(Exception e)
        {
            System.out.println(0);
        }
    }

     static int spf(int n)
    {
        if (n <= 1)
            return 1;
        if (n <= 3)
            return 0;
        if (n % 2 == 0 )
            return 2;
        if ( n % 3 == 0)
            return 3;

        for (int i = 5; i * i <= n; i = i + 6)
           { if (n % i == 0 )
                return i;
             if (n % (i + 2) == 0)
                return i+2;
            }
        return 0;
    }
}


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int t = scan.nextInt();
        for (int z = 0; z < t; z++) {
            long n = scan.nextInt();
            boolean a=true;
                if(n%2==0) System.out.println((n/2)+" "+ (n/2));
                else{
                    int y=0;
                    for(long i=n/2;i>1;i--){
                        if(n%i==0){
                            a=false;
                            y=i;
                            break;
                        }
                        else{
                            a=true;
                        }
                    }
                    if(a==false){
                        System.out.println(y+" "+(n-y));
                    }
                    else{
                        System.out.println(1+" "+(n-1));
                    }
                }
            }
        }
    }


import java.util.*;
public class Codeforces{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		for(int i=0;i<t;i++) {
			long n=sc.nextLong();
			long a=0;
			long b=0;
			for(long j=2;j<=n/2;j++) {
				if(n%j==0) {
					long factor=j;
					if(factor%2==0) b=(n/j)*(factor/2);
					else b=(n/j)*(factor-1);
					a=n-b;
					break;
				}
			}
			if(b==0 && a==0) {
				System.out.println(String.valueOf(1)+" "+String.valueOf(n-1));
			}
			else{
				System.out.println(String.valueOf(a)+" "+String.valueOf(b));
			}
		}
	}


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

 public class gfg  {

    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException{
        //Reader.init(System.in);

        Reader.init(System.in);
        int t = Reader.nextInt();
        while(t-->0){
           solve();
        }
        out.close();
    }

    static ArrayList<Integer>[] graph;
    static int n=8;
    static int m=8;
    static int k =0;
    static long mod =1000000007;
    static int MOD = 1000000007;
    static int[] dx = {0,0,1,-1};
    static int[] dy = {1,-1,0,0};
    static int[] cost;
    static int[] col; //0 ,1,2
    static int[] par;
    static long ans=0;
    static ArrayList<Integer> list;

    static void solve()throws IOException{
        n = Reader.nextLong();
        long x = printDivisors(n);
        if(n==1){
            out.println(0+" "+1);
            return;
        }
        if(x==-1){
            out.println(1+" "+(n-1));
            return;
        }
        else{
            out.println(n/x+" "+((x-1)*(n))/x) ;
        }
    }

    static long printDivisors(long n)
    {
        // Note that this loop runs till square root
        for (int i=2; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                return i;
            }
        }
        return -1;
    }

    // ggratest common divisor println
    static int gcd(int a , int b){
        if(b==0)
            return a;
        else
            return gcd(b,a%b);
    }

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

    // a^b
    static long fastpow(long a, long b){
        long res = 1;a=a%mod;
        while(b>0){
            if(b%2==1)
                res = (res*a)%mod;
            a = (a*a)%mod;
            b = b>>1;
        }
        return res;
    }

    // segment tree
   /* static void update(int ind, int l, int h, int pos, int v){
        if(l==h){
            seg[ind] = v;
            return;
        }
        int mid = (l+h)/2;
        if(pos<=mid)
            update(2*ind,l,mid,pos,v);
        else
            update(2*ind+1,mid+1,h,pos,v);
        seg[ind] = seg[2*ind]^seg[2*ind+1];
    }
    static int query(int ind, int l , int h, int ll , int hh){
        if(ll>hh)
            return 0;
        if(l==ll && h==hh)
            return seg[ind];
        int mid = (l+h)/2;
        return query(2*ind,l,mid,ll,Math.min(mid,hh)) ^ query(2*ind+1,mid+1,h,Math.max(mid+1,ll),hh);
    }*/
    // priority queue with comparator
    // PriorityQueue<Interval> pq = new PriorityQueue<>(new Comparator<Interval>() {
    //             public int compare(Interval a, Interval b){
    //                 int diff1 = a.r - a.l;
    //                 int diff2 = b.r - b.l;

    //                 if(diff1 == diff2){
    //                     return a.l - b.l;
    //                 }

    //                 return diff2 - diff1;
    //             }
    // });
}

class trienode{
        int v;
        trienode[] child ;
        boolean leaf;
        int cnt;
        int p=0;
        trienode(int vv){
            child = new trienode[2];
            leaf=false;
            cnt=0;
            v=vv;
        }
        trienode(){
            child = new trienode[2];
            leaf=false;
            cnt=0;
            v=0;
        }
    }
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}
class newcomparator implements Comparator<Integer>{
    //@Override
    public int compare(Integer a, Integer  b){
        return a<=b?1:-1;
    }
 }
class node {
    int f;
    int s;// cost to rreach\
    node(int ff,int ss){
        f=ff;
        s=ss;
    }
}
class mergesort{
    static void sort(int l, int h, int[] arr){
        if(l<h){
            int mid = (l+h)/2;

            sort(l,mid,arr);
            sort(mid+1,h,arr);
            merge(l,mid,h,arr);
        }
    }
    static void merge(int l, int m , int h , int [] arr){

        int[] left = new int[m-l+1];
        int[] right = new int[h-m];
        for(int i= 0 ;i< m-l+1;i++){
            left[i] = arr[l+i];
        }
        for(int i=0;i<h-m;i++){
            right[i] = arr[m+1+i];
        }
        //now left and right arrays are assumed to be sorted and we have tp merge them together
        // int the original aaray.
        int i=l;
        int lindex = 0;
        int rindex =  0;

        while(lindex<m-l+1 && rindex<h-m){
            if(left[lindex]<=right[rindex]){
                arr[i]=left[lindex];
                lindex++;
                i++;
            }
            else{
                arr[i]=right[rindex];
                rindex++;
                i++;
            }
        }
        while(lindex<m-l+1){
            arr[i]=left[lindex];
            lindex++;
            i++;
        }
        while(rindex<h-m){
            arr[i]=right[rindex];
            rindex++;
            i++;
        }
    }

}


import java.io.BufferedInputStream;
import java.util.Scanner;

/**
 * Created by jizhe on 2016/1/5.
 */
public class CountingRhombi {
    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedInputStream(System.in));

        int W = in.nextInt();
        int H = in.nextInt();

        if( W < 2 || H < 2 )
        {
            System.out.printf("0\n");
            return;
        }

        int w = 2, h = 2, count = 0;
        while( w <= W && h <= H )
        {
            //System.out.printf("w: %d, h: %d\n", w, h);
            for( int i = H-h/2; i >= h/2; i-- )
            {
                //System.out.printf("i: %d\n", i);
                for( int j = w/2; j <= W-w/2; j++ )
                {
                    //System.out.printf("j: %d\n", j);
                    count++;
                }
            }
            //System.out.printf("count: %d\n", count);
            w += 2;
            if( w <= W )
            {
                //System.out.printf("w: %d, h: %d\n", w, h);
                for( int i = H-h/2; i >= h/2; i-- )
                {
                    //System.out.printf("i: %d\n", i);
                    for( int j = w/2; j <= W-w/2; j++ )
                    {
                        //System.out.printf("j: %d\n", j);
                        count++;
                    }
                }
                //System.out.printf("count: %d\n", count);
            }

            w -= 2;
            h += 2;
            if( h <= H )
            {
                //System.out.printf("w: %d, h: %d\n", w, h);
                for( int i = H-h/2; i >= h/2; i-- )
                {
                    //System.out.printf("i: %d\n", i);
                    for( int j = w/2; j <= W-w/2; j++ )
                    {
                        //System.out.printf("j: %d\n", j);
                        count++;
                    }
                }
                //System.out.printf("count: %d\n", count);
            }

            w += 2;
        }

        System.out.printf("%d\n", count);
    }
}


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

/**
 * 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;
        Scanner in = new Scanner(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, Scanner in, PrintWriter out) {

            int w = in.nextInt(), h = in.nextInt();
            int count = 0;

        /*
        x0=0
        x1=2
        y0=0
        y1=2
        */
            for (int x0 = 0; x0 < w; x0++) { // from [0, w))
                for (int x1 = x0 + 2; x1 <= w; x1 += 2) { //from [x0+2;w] with increments +2)
                    for (int y0 = 0; y0 < h; y0++) { //move y0 from [0;h)
                        for (int y1 = y0 + 2; y1 <= h; y1 += 2) { //move y1 from [y0+2;h] with increments +2
                            if ((x1 - x0) % 2 == 0 && (y1 - y0) % 2 == 0) {
                                count++;
                            }
                        }
                    }
                }
            }

            out.print(count);
        }

    }
}


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

public class test2
{

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

	PrintWriter out = null;

	long cal(int w, int h, int ww, int hh)
	{
		long hc = 0;
		for (int i = 0; i <= Math.min(hh - 1, h - hh); i++)
		{
			hc += (h - i) / hh;
		}

		long wc = 0;
		for (int j = 0; j <= Math.min(ww - 1, w - ww); j++)
		{
			wc += (w - j) / ww;
		}

		return hc * wc;
	}

	void run() throws Exception
	{
		Scanner in = new Scanner(System.in);
		out = new PrintWriter(System.out);

		int w = in.nextInt();
		int h = in.nextInt();

		long total = 0;

		for (int i = 1; 2 * i <= w; i++)
		{
			for (int j = 1; 2 * j <= h; j++)
			{
				total += cal(w, h, 2 * i, 2 * j);
			}
		}

		out.println(total);
		out.close();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class C119P2 {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer input;

    public static void main(String[] args) throws IOException {
        //-------------------------------------------------------------------------
        //Initializing...
        new C119P2();
        //-------------------------------------------------------------------------
        //put your code here... :)
        int w = nextInt();
        int h = nextInt();
        long [][] dp = new long[w+1][h+1];
        for (int i = 2; i < dp.length; i++) {
            for (int j = 2; j < dp.length; j++) {
                dp[i][j] = dp[i-1][j]+dp[i][j-1]-dp[i-1][j-1]+1;
            }
        }
        writeln(""+dp[w][h]);
        //-------------------------------------------------------------------------
        //closing up
        end();
        //--------------------------------------------------------------------------

    }

    public C119P2() throws IOException {
        //Input Output for Console to be used for trying the test samples of the problem
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        //-------------------------------------------------------------------------
        //Initalize Stringtokenizer input
        input = new StringTokenizer(in.readLine());
    }

    private static int nextInt() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Integer.parseInt(input.nextToken());
    }
    private static long nextLong() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Long.parseLong(input.nextToken());
    }
    private static double nextDouble() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Double.parseDouble(input.nextToken());
    }
    private static String nextString() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return input.nextToken();
    }
    private static void write(String output){
        out.write(output);
        out.flush();
    }
    private static void writeln(String output){
        out.write(output+"\n");
        out.flush();
    }
    private static void end() throws IOException{
        in.close();
        out.close();
        System.exit(0);
    }

}


public class p62a {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int f1 = in.nextInt();
        int f2 = in.nextInt();

        int m1 = in.nextInt();
        int m2 = in.nextInt();
        if(f1-m2 == 1 || f2-m1 == 1) {
            System.out.println("YES");
            return;
        }
        if(f1 <= m2) {
            int maxMale = (f1+1)*2;
            if(m2<=maxMale) {
                System.out.println("YES");
                return;
            }
        }
        if(f2<=m1) {
            int maxMale = (f2+1)*2;
            if(m1<=maxMale) {
                System.out.println("YES");
                return;
            }
        }
        System.out.println("NO");
    }
}


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

public class Dream {

//  static final String F_IN             = "inout/cf/beta58/dream.in";
//  static final File F_OUT     = new File("inout/cf/beta58/dream.out");

     static final InputStream F_IN = System.in;
     static final PrintStream F_OUT = System.out;

    String ans;
    int[] g, b;

    void readInput() throws Exception {
//      BufferedReader br = new BufferedReader(new FileReader(F_IN));
         BufferedReader br = new BufferedReader(new InputStreamReader(F_IN));
        g = toInts(br.readLine());
        b = toInts(br.readLine());
    }

    void writeOutput() throws Exception {
        PrintWriter out = new PrintWriter(F_OUT);
        out.println(ans);
        out.close();
    }

    boolean comfortable(int x, int y) {
        return Math.abs(x-y)<=1;
    }

    void solveProblem() {
        ans = comfortable(g[1], b[0]) || comfortable(g[0], b[1]) ? "YES" : "NO";
    }

    public Dream() throws Exception {
        readInput();
        solveProblem();
        writeOutput();
    }

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

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

    String[] toTokens(String s) {
        StringTokenizer st = new StringTokenizer(s);
        List<String> list = new ArrayList<String>();
        while (st.hasMoreTokens()) {
            list.add(st.nextToken());
        }
        String[] res = new String[list.size()];
        for (int i = 0; i < res.length; i++)
            res[i] = list.get(i);
        return res;
    }

    int[] toInts(String s) {
        StringTokenizer st = new StringTokenizer(s);
        List<Integer> list = new ArrayList<Integer>();
        while (st.hasMoreTokens()) {
            list.add(Integer.parseInt(st.nextToken()));
        }
        int[] res = new int[list.size()];
        for (int i = 0; i < res.length; i++)
            res[i] = list.get(i);
        return res;
    }

    long[] toLongs(String s) {
        StringTokenizer st = new StringTokenizer(s);
        List<Long> list = new ArrayList<Long>();
        while (st.hasMoreTokens()) {
            list.add(Long.parseLong(st.nextToken()));
        }
        long[] res = new long[list.size()];
        for (int i = 0; i < res.length; i++)
            res[i] = list.get(i);
        return res;
    }

}


public class Dream {

    static private Scanner sc=new Scanner(System.in);
    static private int hI, hD, mI, mD;

    public static void main(String[] args) {

        mI=sc.nextInt();
        mD=sc.nextInt();

        hI=sc.nextInt();
        hD=sc.nextInt();

        if ((mI-hD)<2 || (mD-hI)<2){
            System.out.println("YES");
        } else System.out.println("NO");
    }

}


import java.io.BufferedOutputStream;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigInteger;
import java.io.*;
import java.util.*;
public class Main {
	private static Reader fr;
	private static OutputStream out;
	private static final int delta = (int) 1e9 + 7;

	private static class Reader {
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

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

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

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

		public int nextInt() 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 nextLong() 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 nextDouble() 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 int[] nextArray(int n) throws IOException {
			int arr[] = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}
	}

	private static void print(Object str) {
		try {
			out.write(str.toString().getBytes());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	private static void println(Object str) {
		try {
			out.write((str.toString() + "\n").getBytes());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	private static void printArray(int arr[]) {
		for (int val : arr) {
			print(val + " ");
		}
		println("");
	}

	private static long add(long a, long b) {
		return add(a, b, delta);
	}

	private static long add(long a, long b, long mod) {
		return ((a % mod) + (b % mod)) % mod;
	}

	private static long multiply(long a, long b) {
		return ((a % delta) * (b % delta)) % delta;
	}

	public static double multiply(double a, double b) {
		return ((a % delta) * (b % delta)) % delta;
	}

	private static long pow(int base, int pow) {
		if (pow == 0)
			return 1;
		if (pow == 1)
			return base;
		long halfPow = pow(base, pow / 2);
		if ((pow & 1) == 0)
			return multiply(halfPow, halfPow);
		return multiply(halfPow, multiply(base, halfPow));
	}

	private static long gcd(long a, long b) {
		if (a == 0 || b == 0)
			return a == 0 ? b : a;
		return gcd(b, a % b);
	}

	private static long kadane(int[] arr) {
		int size = arr.length;
		long max_so_far = Integer.MIN_VALUE, max_ending_here = 0;

		for (int anArr : arr) {
			max_ending_here = max_ending_here + anArr;
			if (max_so_far < max_ending_here)
				max_so_far = max_ending_here;
			if (max_ending_here < 0)
				max_ending_here = 0;
		}
		return max_so_far;
	}

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

	private static void run() throws IOException {
		fr = new Reader();
		out = new BufferedOutputStream(System.out);
		solve();
		out.flush();
		out.close();
	}
	static int mod=1000000007;
	private static void solve() throws IOException
	{
	    int n = fr.nextInt();
	    String s=fr.readLine();
	    int min=Integer.MAX_VALUE;
		for(int i=0;i<n-3;i++)
		{
		    int temp=fun(s,i);
		    if(min>temp)
		        min=temp;
		}
	   System.out.println(min);

    }
    statica int fun(String s,int i)
    {

        int a=(int)Math.min(Math.abs(s.charAt(i)-'A'),Math.abs('A'-s.charAt(i)));
        int b=(int)Math.min(Math.abs(s.charAt(i+1)-'C'),Math.abs('C'-s.charAt(i+1)));
        int c=(int)Math.min(Math.abs(s.charAt(i+2)-'T'),Math.abs('T'-s.charAt(i+2)));
        int d=(int)Math.min(Math.abs(s.charAt(i+3)-'G'),Math.abs('G'-s.charAt(i+3)));
        if(a==25)
            a=1;
        if(b==25)
            b=1;
        if(c==25)
            c=1;
        if(c==25)
            c=1;
        return a+b+c+d;
    }
    static void task0(ArrayList<Integer>[] g ,long a[],long b[],long c[],int n,int s,int p,long x)
    {
        x=gcd1(x,a[s]);
        System.out.print(x+" ");
        if(g[s].size()==1&&s!=0)
        {
            c[s]=gcd1(x,b[s]);

        }
        for(int i=0;i<g[s].size();i++)
            if(g[s].get(i)!=p)
                task0(g,a,b,c,n,g[s].get(i),s,x);
    }
    static void QuickSort(int arr[],int brr[],int l,int r){
        if(l<r){
            int q=quick(arr,brr,l,r);
            QuickSort(arr,brr,l,q-1);
            QuickSort(arr,brr,q+1,r);
        }
    }
    static int quick(int ar[],int br[],int l,int r){
        int tmp=ar[r],tm=0;
        int i=l-1;
        for(int j=l;j<r;j++)
            if(ar[j]<=tmp){
                i++;
                tm=ar[i];
                ar[i]=ar[j];
                ar[j]=tm;
                tm=br[i];
                br[i]=br[j];
                br[j]=tm;
            }
        tm=ar[i+1];
        ar[i+1]=ar[r];
        ar[r]=tm;
        tm=br[i+1];
        br[i+1]=br[r];
        br[r]=tm;
        return i+1;
    }
    static long gcd1(long a, long b)
    {
      if (b == 0)
        return a;
      return gcd(b, a % b);
    }
    static void print1(ArrayList<Integer>[] g,int n)
    {
        for(int i=0;i<n;i++)
        {
            System.out.print(i+"\t");
            for(int j=0;j<g[i].size();j++)
                System.out.print(g[i].get(j)+" ");
            System.out.println();
        }
    }
}


import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s = sc.next();
        String s1 = "ACTG";
        int ans = Integer.MAX_VALUE;
        for (int i =0 ; i < n-3 ; i ++) {
            int t = 0;
            for (int j = 0 ; j < 4 ; j ++) {
                int y = Math.abs((int)s.charAt(j)-s1.charAt(i+j));
                t+=Math.min(c,26-c);
            }
            ans = Math.min(t,ans);
        }
        System.out.println(ans);
    }
}


import java.io.*;

import java.math.BigInteger;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;

public class main2 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		String s="ACTG";
        int x = 2 + 2;
		String in=sc.next();
        bool pl = false;
		int min=Integer.MAX_VALUE;
		for(int i=0;i<(in.length()-3);i++)
		{
			int cost=0;
            if(cost)
                pl =true;
			for(int j=i;j<(i+4);j++)
			{
				if(s.charAt(j-i)==in.charAt(j))
				{}
				else
				{
					cost+=Integer.min(Math.abs(s.charAt(j-i)-in.charAt(j)),26-Integer.max(s.charAt(j-i), in.charAt(j))+Integer.min(s.charAt(j-i),in.charAt(j)));
				}
			//	System.out.println((s.charAt(j)+""+in.charAt(j)+" "+(26-Integer.max(s.charAt(i), in.charAt(j))+Integer.min(s.charAt(i),in.charAt(j)))));
			}
			if(cost<min)
				min=cost;

		}
        if(min)
            pl = true;
		System.out.println(min);

	}
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
public class codeforces{

    public static int minzz(int bc,int bsdk)
    {
        if(bc<bsdk)
        return bc;
        return bsdk;
    }
    public static void main(String[] args) throws Exception{
        InputStreamReader isr=new InputStreamReader(System.in);
        BufferedReader br=new BufferedReader(isr);
        // StringBuilder str=new StringBuilder();
        int l=Integer.valueOf(br.readLine());
        String string=br.readLine();
        int i=0,lol=0,jawab=Integer.MAX_VALUE;
        for(i=0;i<l-3;i++)
        {
            lol+=minzz(Math.abs((int) string.charAt(i)-65), Math.abs(26-Math.abs((int) string.charAt(i)-65)));
            lol+=minzz(Math.abs((int) string.charAt(i+1)-67),Math.abs(26-Math.abs((int) string.charAt(i+1)-67)));
            lol+=minzz(Math.abs((int) string.charAt(i+2)-84),Math.abs(26-Math.abs((int) string.charAt(i+2)-84)));
            lol+=minzz(Math.abs((int) string.charAt(i+3)-71),MAth.abs(26-Math.abs((int) string.charAt(i+3)-71)));
            if(lol<jawab)
            jawab=lol;
            lol=0;
        }
        System.out.println(jawab);

    }
}


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

public class Gennady {

private static final Scanner scanner = new Scanner(System.in);

    public static  boolean test(String x,char x1,char x2,int c1,int c2,String y){

             char y1 = y.charAt(0);
        char y2 = y.charAt(1);
        if(x1==y1 || x2==y2){
            c1++;
        }else{
            c2++;
        }

     if(c1 == 0){
            return false;
        }
            return true;

    }

    public static void main(String[] args){
        String x = scanner.nextLine();
          char x1 = x.charAt(0);
        char x2 = x.charAt(1);
        int c1,c2,c3;
        boolean ret = false;
        for(int i=0;i<5;i++){
              c1=0;
        c2=0;
        c3=0;
            String y = scanner.next();
         ret = test(x,x1,x2,c1,c2,y);
         if(ret==true){
             c3++;
         }
        }
        if(c3>0){
            System.out.println("YES");
        }else{
              System.out.println("NO");
        }
        }

    }


import java.util.Scanner;
import java.util.HashSet;
import java.util.Set;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    String tableCard = scanner.nextLine();
    String hand = scanner.nextLine();

    Set<char> rank = new HashSet<>();
    Set<char> suit = new HashSet<>();

    for (int i = 0; i < 5; ++i) {
      rank.add(hand[i*3]);
      suit.add(hand[1+i*3]);
    }

    if (rank.contains(tableCard[0]) || suit.contains(tableCard[1])) {
      System.out.println("YES");
    }

    System.out.println("NO");
  }
}


import java.util.*;

public class sum{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String st = sc.next();
		String sh[] = new String[5];
		String ans = null;
		for(int i=0;i<5;i++){
			sh = sc.next();
		}

		for(int i=0;i<5;i++){
			if(sh[i].charAt(0) == st.charAt(0) || sh[i].charAt(1) == st.charAt(1) ){
				 ans = "YES";
				System.out.println(ans);
			break;
		}
		}

		if(ans!="YES")
		System.out.println("NO");
	}

}


import java.util.*;
public class test
{
   public static void main(String args[])
   {
     Scanner sc=new Scanner(System.in());
	 String s=sc.nextLine();
	 char c[]=s.toCharArray();
	 for(int i=0;i<5;i++)
	 {
		 s=sc.next();
		 char ch[]=s.toCharArray();
		 if(c[0]==ch[0] || c[1]==ch[1])
		 {
            System.out.println("YES");
			break;
		 }
	 }
   }
}


import java.util.*;

public class Main{
   public static void main(String[] args) {
    Scanner scn=new Scanner(System.in);
	int n=scn.nextInt();
	int k=scn.nextInt();
	int[] a=new int[n];
	boolean all=true;
	for(int i=0;i<n;i++)
	{
		a[i]=scn.nextInt();
		if(a[i]>k)
		all=false;
	}
	int ans=0,j=0;
	if(all)
	ans=n;
	else{
	while((a[j]<=k)&&j!=n)
	{
		ans++;
		j++;
	}

	int l=n-1;
	while(a[l]<=k&&l!=0&&flag!=1)
	{
		ans++;
		l--;
	}
	}
	System.out.println(ans);
}
}