import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main (String []args) throws IOException{
		Scanner in = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		int n = in.nextInt();
		BigInteger b[] = new BigInteger[30];
		b[0] = BigInteger.ONE;
		for(int i=1; i<=n; i++)
			b[i] = b[i-1].multiply(BigInteger.valueOf(i));
		long a[] = { 1, 0, 3, 0, 15, 0, 133, 0, 2025, 0, 37851, 0, 1030367, 0, 36362925, 0};
        pw.print(b[i].multiply(BigInteger.valueOf(a[n-1])).mod(1000000007).toString());
		pw.close();
	}
}


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

public class Main {
    static FastReader read;
    static ArrayList<Integer> result;
    static ArrayList<Integer> prime;

    public static void main(String[] args) throws IOException{
        read = new FastReader();
        int n = read.nextInt();
        int k = read.nextInt();
        result = new ArrayList();
        prime = new ArrayList();

        for (int i = 2; i*i <= n; i++) {
            if(isPrime(i))
                prime.add(i);
        }

        factors(n,k);

        if(result.size()<k)
            System.out.println("-1");
        else
            for (int i = 0; i < result.size(); i++) {
                System.out.print(result.get(i)+" ");
            }
    }

    public static boolean isPrime(int x){
        for (int i = 2; i*i <= x; i++) {
            if(x%i == 0)
                return false;
        }
        return true;
    }

    public static void factors(int n,int k){
        if(k<=0)
            return;

        if(k==1){
            if(n!=1)
                result.add(n);
            return;
        }

        for (int i = 0; i < prime.size(); i++) {
            int x = prime.get(i);
            if(n%x==0){
                result.add(x);
                k--;
                factors(n/x, k);
                break;
            }
        }
    }

}


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

public class Main {

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

        long p=scanner.nextInt();
        int k=scanner.nextInt();

        ArrayList<Long> list=new ArrayList<>();
        for (int i=0;p>0;i++) {
            list.add((i%2==0?1:-1)*(p%k));
            p/=k;
        }

        for (int i=0;i<list.size();i++) {
            if (list.get(i)<0) {
                list.set(i, list.get(i)+k);
                if (i==list.size()-1) list.add(1L);
                else list.set(i+1, list.get(i+1)+1);
            }
            else if (list.get(i)>=k) {
                list.set(i, list.get(i)-k);
                if (i==list.size()-1) list.add(-1L);
                else list.set(i+1, list.get(i+1)-1);
            }
        }
        System.out.println(list.size());
        System.out.println(String.join(" ", list.stream().map(String::valueOf).collect(Collectors.toList())));
    }

}


import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class E {

	public static boolean is_center(final long x, final long y){
		final long x_sign = Math.abs(x) % 2;
		final long y_sign = Math.abs(y) % 2;

		return x_sign == y_sign;
	}

	public static long calc_y_size(final long x, long y1, long y2){
		if(x % 2 == 0){
			if(y1 % 2 == 0){ y1--; }
			if(y2 % 2 == 0){ y2++; }

			return (y2 - y1) / 2;
		}else{
			if(y1 % 2 == 1){ y1--; }
			if(y2 % 2 == 1){ y2++; }

			return (y2 - y1) / 2;
		}
	}

	public static void main(String[] args) {
		try (final Scanner sc = new Scanner(System.in)) {
			final long x1 = sc.nextLong();
			final long y1 = sc.nextLong();
			final long x2 = sc.nextLong();
			final long y2 = sc.nextLong();

			if(x1 == x2){
				System.out.println(calc_y_size(x1, y1, y2));
				return;
			}

			final long x1_y_size = calc_y_size(x1, y1, y2);
			final long x1_1_y_size = calc_y_size(x1 + 1 + 1, y2, y2);

			System.out.println(x1_y_size * (x2 - x1) / 2 + x1_1_y_size * ((x2 - x1) - ((x2 - x1) / 2));

			long answer = 0;

			System.out.println(answer);
		}
	}

	public static class Scanner implements Closeable {
		private BufferedReader br;
		private StringTokenizer tok;

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

		private void getLine() {
			try {
				while (!hasNext()) {
					tok = new StringTokenizer(br.readLine());
				}
			} catch (IOException e) { /* ignore */
			}
		}

		private boolean hasNext() {
			return tok != null && tok.hasMoreTokens();
		}

		public String next() {
			getLine();
			return tok.nextToken();
		}

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

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

		public void close() {
			try {
				br.close();
			} catch (IOException e) { /* ignore */
			}
		}
	}
}


 import java.utils.*;

 public class Main{
    public static void main (String args[])  {
     Scanner sc =new Scanner(System.in);
        long x1=sc.nextInt();
        long y1=sc.nextInt();
        long x2=sc.nextInt();
        long y2=sc.nextInt();
     System.out.println((1+(y2-y1)/2)*(1+(x2-x1)/2)+((y2-y1)/2)*((x2-x1)/2));
    }
 }


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

public class S {

	public static void main(String[] args) {
		FastReader in = new FastReader();
		PrintWriter out = new PrintWriter(System.out);
		int a = in.nextInt(), b = in.nextInt(), c = in.nextInt();
		int mod = 1073741824, sum = 0;
		for(int i = 1; i<=a; i++) {
			for(int j = 1; j<=b; j++) {
				for(int k = 1; k<=c; k++) {
					int n = d(i*j*k);
					if(n>mod) sum+=(n%mod);
					else sum+=n;
				}
			}
		}
		out.print(sum);

		out.close();

    }
	private static int d(int i) {
		int num = 0;
		for(int a = 1; a<=i; a++)
			if(i%a==0) num++;

		return num;
	}
	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;
        }
    }

}


import java.util.*;
public class Cola {
static int ans=0;
static int n;
static void testCheck(int a,int b){
int temp=n-a-2*b;
if(temp%4==0 && temp>=0 && temp/4<=c)
ans++;
}
public static void main(String [] args){
Scanner in=new Scanner(System.in);
n=in.nextInt();
n=2*n;
int a=in.nextInt();
int b=in.nextInt();
int c=in.nextInt();
for(int i=0;i<=a;i++){
for(int j=0;j<=b;j++){
testCheck(i,j,c);
}
}
System.out.println(ans);
}
}


import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Arrays;

public class E {

	static int N;
	static int K;
	static int mod = 998244353;
	static long modInvOf2;
	static int dp[][][][][];
	public static void main(String[] args) {
		JS in = new JS();
		N = in.nextInt();
		K = in.nextInt();
		modInvOf2 = modInv(2, mod);
		dp = new int[2][2][N+1][N+1][N+1];
		for(int a[][][][] : dp) {
			for(int b[][][] : a) {
				for(int c[][] : b) {
					for(int d[] : c) {
						Arrays.fill(d, -1);
					}
				}
			}
		}
		long res = 0;
		for(int run = 1; run <= N; run++) {
			long masks = go(1, run==1?1:0, 1, 1, run) + go(0, run==1?1:0, 1, 1, run);
			if(masks > mod) masks -= mod;
			long max = K/run;
			if(K%run == 0) max--;
			if(max == 0) continue;
			long ways = go(1, 1, 1, 1, Math.min(N,(int)max)) + go(0, 1, 1, 1, Math.min(N,(int)max));
			long curRes = (masks*ways)%mod;
			res += curRes;
			if(res >= mod) res -= mod;
		}
		res = ((res*modInvOf2)%mod+mod)%mod;
		System.out.println(res);

	}
	static int go(int bit, int have, int index, int cur, int goal) {
		if(index >= N) return have;
		if(dp[bit][have][index][cur][goal] != -1) return dp[bit][have][index][cur][goal];
//		//take
		int take = -1;
		if(bit == 0) {
			take = go(1, have, index+1, 1, goal);
		}
		else {
			if(cur+1 > goal) take = 0;
			else take = go(1, have | (cur+1 == goal ? 1 : 0), index+1, cur+1, goal);
		}
		//leave
		int leave = -1;
		if(bit == 1) {
			leave = go(0, have, index+1, 1, goal);
		}
		else {
			if(cur+1 > goal) leave = 0;
			else leave = go(0, have | (cur+1 == goal? 1 : 0), index+1, cur+1, goal);
		}
		int res = take+leave;
		if(res >= mod) res -= mod;
		return dp[bit][have][index][cur][goal] = res;
	}

	static long modInv(long x, long mod) {
		if(x == 1) return 1;
		long r = mod % x;
		return modInv(r, x % r, 0, 1, mod / x, x / r);
	}
	static long modInv(long a, long b, long y0, long y1, long q0, long q1) {
		long y2 = y0 - y1*q0;
		return b == 0 ? y2 : modInv(b, a % b, y1, y2, q1, a / b);
	}

	static class JS{
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public JS() {
			in = new BufferedInputStream(System.in, BS);
		}

		public JS(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
		    while(c!='.'&&c!='-'&&(c <'0' || c>'9')) c = nextChar();
		    boolean neg = c=='-';
		    if(neg)c=nextChar();
		    boolean fl = c=='.';
		    double cur = nextLong();
		    if(fl) return neg ? -cur/num : cur/num;
		    if(c == '.') {
			double next = nextLong();
			return neg ? -cur-next/num : cur+next/num;
		    }
		    else return neg ? -cur : cur;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
	}

}


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

import javax.swing.plaf.synth.SynthSpinnerUI;

public class tr1 {
	static PrintWriter out;
	static StringBuilder sb;
	static int inf = (int) 1e9;
	static long mod = (long) 998244353;
	static int[] si;
	static ArrayList<Integer> primes;
	static HashSet<Integer> pr;
	static int n, k, m;
	static int[] in;
	static HashMap<Integer, Integer> factors;
	static HashSet<Integer> f;
	static int[] fac, a, b;
	static int[] l, r;
	static int[][] memo;
	static int[] numc;
	static ArrayList<Integer>[] ad;
	static HashMap<Integer, Integer> hm;
	static pair[] ed;
	static TreeSet<Integer>[] np;
	static TreeMap<pair, Integer> tm;
	static int[] le, re;
	static char[] h;
	static pair[] mm;
	static boolean[] vis;
	static int y;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		int n = sc.nextInt();
	    int k=sc.nextInt();
	    long [][][]dp=new long [n+1][n+1][n+1];
	    dp[1][1][1]=1l;
	    for(int i=1;i<n;i++) {
	    	for(int j=1;j<n;j++) {
	    		for(int o=1;o<=n;o++) {
	    			 dp[i+1][j+1][Math.max(o, j+1)]=(dp[i][j][o]+dp[i+1][j+1][Math.max(o, j+1)])%mod;
	    			 dp[i+1][1][Math.max(o, 1)]=(dp[i][j][o]+dp[i+1][1][Math.max(o, 1)])%mod;
	    		}
	    	}
	    }
	    long []co=new long[n+1];
	    for(int i=1;i<=n;i++)
	    	for(int j=1;j<=n;j++)
	    	 co[i]=(dp[n][j][i]+co[i])%mod;
	    long ans=0;
	    for(int i=1;i<=n;i++)
	    	for(int j=1;j<=n;j++)
	    		if(i*j<k)
	    		    ans=(ans+co[i]*co[j])%mod;
	    out.print((ans*2)%mod);
		out.flush();
	}

	static class pair implements Comparable<pair> {
		int x;
		int y;
		int z;
		char d;

		pair(int f, int t, int u, char r) {
			x = f;
			y = t;
			z = u;
			d = r;
		}

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

		@Override
		public int compareTo(pair o) {
			return z - o.z;
		}
	}

	static class pair1 implements Comparable<pair1> {
		int x;
		int y;
		int z;

		pair1(int f, int t, int u) {
			x = f;
			y = t;
			z = u;
			// num = n;
		}

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

		@Override
		public int compareTo(pair1 o) {
			if (x == o.x)
				return y - o.y;
			return x - o.x;
		}
	}

	static public class FenwickTree { // one-based DS

		int n;
		int[] ft;

		FenwickTree(int size) {
			n = size;
			ft = new int[n + 1];
			// for(int i=1;i<=n;i++)
			// ft[i]=i;
		}

		int rsq(int b) // O(log n)
		{
			int sum = 0;
			while (b > 0) {
				sum += ft[b];
				b -= b & -b;
			} // min?
			return sum;
		}

		int rsq(int a, int b) {
			return rsq(b) - rsq(a - 1);
		}

		void point_update(int k, int val) // O(log n), update = increment
		{
			while (k <= n) {
				// System.out.println(k+" "+val);
				ft[k] += val;
				k += k & -k;
			} // min?
		}

		int point_query(int idx) // c * O(log n), c < 1
		{
			int sum = ft[idx];
			if (idx > 0) {
				int z = idx ^ (idx & -idx);
				--idx;
				while (idx != z) {
					// System.out.println("oo");
					sum -= ft[idx];
					idx ^= idx & -idx;
				}
			}
			return sum;
		}

		void scale(int c) {
			for (int i = 1; i <= n; ++i)
				ft[i] *= c;
		}

		int findIndex(int cumFreq) {
			int msk = n;
			while ((msk & (msk - 1)) != 0)
				msk ^= msk & -msk; // msk will contain the MSB of n

			int idx = 0;
			while (msk != 0) {
				int tIdx = idx + msk;
				if (tIdx <= n && cumFreq >= ft[tIdx]) {
					idx = tIdx;
					cumFreq -= ft[tIdx];
				}
				msk >>= 1;
			}
			if (cumFreq != 0)
				return -1;
			return idx;
		}
	}

	static public class SegmentTree { // 1-based DS, OOP

		int N; // the number of elements in the array as a power of 2 (i.e. after padding)
		long[] array, sTree, lazy;

		SegmentTree(long[] in) {
			array = in;
			N = in.length - 1;
			sTree = new long[N << 1]; // no. of nodes = 2*N - 1, we add one to cross out index zero
			lazy = new long[N << 1];
			build(1, 1, N);
		}

		void build(int node, int b, int e) // O(n)
		{
			if (b == e)
				sTree[node] = array[b];
			else {
				int mid = b + e >> 1;
				build(node << 1, b, mid);
				build(node << 1 | 1, mid + 1, e);
				sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
			}
		}

		void update_point(int index, int val) // O(log n)
		{
			index += N - 1;
			sTree[index] += val;
			while (index > 1) {
				index >>= 1;
				sTree[index] = sTree[index << 1] + sTree[index << 1 | 1];
			}
		}

		void update_range(int i, int j, long val) // O(log n)
		{
			update_range(1, 1, N, i, j, val);
		}

		void update_range(int node, int b, int e, int i, int j, long val) {
			if (i > e || j < b)
				return;
			if (b >= i && e <= j) {
				sTree[node] += (e - b + 1) * val;
				lazy[node] += val;
			} else {
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node << 1, b, mid, i, j, val);
				update_range(node << 1 | 1, mid + 1, e, i, j, val);
				sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
			}

		}

		void propagate(int node, int b, int mid, int e) {
			lazy[node << 1] += lazy[node];
			lazy[node << 1 | 1] += lazy[node];
			sTree[node << 1] += (mid - b + 1) * lazy[node];
			sTree[node << 1 | 1] += (e - mid) * lazy[node];
			lazy[node] = 0;
		}

		long query(int i, int j) {
			return query(1, 1, N, i, j);
		}

		long query(int node, int b, int e, int i, int j) // O(log n)
		{
			if (i > e || j < b)
				return 0;
			if (b >= i && e <= j)
				return sTree[node];
			int mid = b + e >> 1;
			propagate(node, b, mid, e);
			long q1 = query(node << 1, b, mid, i, j);
			long q2 = query(node << 1 | 1, mid + 1, e, i, j);
			return q1 + q2;

		}

	}

	static long gcd(long a, long b) {

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

	public int[] merge(int[] d, int st, int e) {
		if (st > e)
			return null;
		if (e == st) {
			int[] ans = { d[e] };
			return ans;
		}
		int mid = (st + e) / 2;
		int[] ans = new int[e - st + 1];
		int[] ll = merge(d, st, mid);
		int[] rr = merge(d, mid + 1, e);
		if (ll == null)
			return rr;
		if (rr == null)
			return ll;
		int iver = 0;
		int idxl = 0;
		int idxr = 0;
		for (int i = st; i <= e; i++) {
			if (ll[idxl] < rr[idxr]) {

			}
		}
		return ans;
	}

	public static class pair2 implements Comparable<pair2> {
		int a;
		int idx;

		pair2(int a, int i) {
			this.a = a;
			idx = i;
		}

		public String toString() {
			return a + " " + idx;
		}

		@Override
		public int compareTo(pair2 o) {
			// TODO Auto-generated method stub
			return idx - o.idx;
		}
	}

	static long inver(long x) {
		int a = (int) x;
		long e = (mod - 2);
		long res = 1;
		while (e > 0) {
			if ((e & 1) == 1) {
				// System.out.println(res*a);
				res = (int) ((1l * res * a) % mod);
			}
			a = (int) ((1l * a * a) % mod);
			e >>= 1;
		}
		// out.println(res+" "+x);
		return res % mod;
	}

	static int atMostSum(int arr[], int n, int k) {
		int sum = 0;
		int cnt = 0, maxcnt = 0;

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

			// If adding current element doesn't
			// cross limit add it to current window
			if ((sum + arr[i]) <= k) {
				sum += arr[i];
				cnt++;
			}

			// Else, remove first element of current
			// window and add the current element
			else if (sum != 0) {
				sum = sum - arr[i - cnt] + arr[i];
			}

			// keep track of max length.
			maxcnt = Math.max(cnt, maxcnt);
		}
		return maxcnt;
	}

	public static int[] longestSubarray(int[] inp) {
		// array containing prefix sums up to a certain index i
		int[] p = new int[inp.length];
		p[0] = inp[0];
		for (int i = 1; i < inp.length; i++) {
			p[i] = p[i - 1] + inp[i];
		}

		// array Q from the description below
		int[] q = new int[inp.length];
		q[inp.length - 1] = p[inp.length - 1];
		for (int i = inp.length - 2; i >= 0; i--) {
			q[i] = Math.max(q[i + 1], p[i]);
		}
		int a = 0;
		int b = 0;
		int maxLen = 0;
		int curr;
		int[] res = new int[] { -1, -1 };
		while (b < inp.length) {
			curr = a > 0 ? q[b] - p[a - 1] : q[b];
			if (curr >= 0) {
				if (b - a > maxLen) {
					maxLen = b - a;
					res = new int[] { a, b };
				}
				b++;
			} else {
				a++;
			}
		}
		return res;
	}

	static void factor(int n) {
		if (si[n] == n) {
			f.add(n);
			return;
		}
		f.add(si[n]);
		factor(n / si[n]);
	}

	static void seive() {
		si = new int[100001];
		primes = new ArrayList<>();
		int N = 100001;
		si[1] = 1;
		for (int i = 2; i < N; i++) {
			if (si[i] == 0) {
				si[i] = i;
				primes.add(i);
			}
			for (int j = 0; j < primes.size() && primes.get(j) <= si[i] && (i * primes.get(j)) < N; j++)
				si[primes.get(j) * i] = primes.get(j);

		}
	}

	static class unionfind {
		int[] p;
		int[] size;
		int jum;

		unionfind(int n) {
			p = new int[n];
			size = new int[n];

			for (int i = 0; i < n; i++) {
				p[i] = i;
			}
			jum = n;
			Arrays.fill(size, 1);
		}

		int findSet(int v) {
			if (v == p[v])
				return v;
			return p[v] = findSet(p[v]);
		}

		boolean sameSet(int a, int b) {
			a = findSet(a);
			b = findSet(b);
			if (a == b)
				return true;
			return false;
		}

		int max() {
			int max = 0;
			for (int i = 0; i < size.length; i++)
				if (size[i] > max)
					max = size[i];
			return max;
		}

		void combine(int a, int b) {
			a = findSet(a);
			b = findSet(b);
			if (a == b)
				return;
			jum--;
			if (size[a] > size[b]) {
				p[b] = a;
				size[a] += size[b];

			} else {
				p[a] = b;
				size[b] += size[a];
			}
		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

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

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

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

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

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

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

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

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

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

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import java.io.*;
public class TestClock
{

    public static String readLine () throws IOException
    {
        BufferedReader stdin = new BufferedReader (new InputStreamReader (System.in));
        String valueString = null;
        while (valueString == null)
        {
            valueString = stdin.readLine ();
        }
        return valueString;
    }

    public static int toInt (String valueString) throws NumberFormatException
    {
        return Integer.parseInt (valueString);
    }

    public static String formatInt (double value)
    {
        String string = value + ".0";
        String[] param = string.split ("\\.");
        if ("0".equals (param [1]) == false)
            param [1] = "." + param [1].substring (0);
        else
            param [1] = "";
        return param [0] + param [1];
    }

    static final int HH_MAX = 23, HH_MIN = 0, MM_MAX = 59, MM_MIN = 0;
    static final double HH_RAD = 360 / 12;
    static final double MM_RAD = 360 / 60;
    static final double HM_RAD = HH_RAD / 60;
    public static void main (String[] args)
    {
        int HH, MM;
        double HH_OUT = 0;
        double MM_OUT = 0;
        boolean sw = true;
        while (sw == true)
        {
            try
            {
                String string = readLine ();
                if (string == null || string.length () == 0)
                    break;
                String[] param = string.split (":");
                HH = toInt (param [0]);
                MM = toInt (param [1]);
                HH_OUT = (HH * HH_RAD + MM * HM_RAD) % 360;
                MM_OUT = (MM * MM_RAD);
                System.out.println (HH_OUT + " " + MM_OUT);
            }
            catch (Exception e)
            {
                e.printStackTrace ();
                sw = false;
            }
        }
        //System.out.println ("---END---");
    } // main method
} // TestClock class


import java.util.Scanner;
public class Simple {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		long[] data = getnumber(sc.nextLine());
		String temp = merge(data[0]);
		long t = 0;
		for (int i = (int)data[1] - 1; i < data[2]; i++) {
			if(temp.charAt(i) == '1'){
				t++;
			}
		}
		System.out.print(t);

	}
	public static String merge(long number){
		if(number == 1){
			return "1";
		}else {
			String temp = merge(number/2);
			String c = String.valueOf(number % 2);
			return temp + c + temp ;
		}
	}

	public static long[] getnumber(String temp) {
		String[] t = temp.split("\\s");
		long[] data = new long[t.length];
		for(int i=0;i < t.length;i++){
			data[i] = Long.valueOf(t[i]);
		}
		return data;
	}

}


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

public class A implements Runnable {

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;

	public static void main(String[] args) {
		new Thread(null, new A(), "", 64*1024*1024).start();
	}

	public void run() {
		try {
			long t1 = 0, t2 = 0, m1 = 0, m2 = 0;
			if (LOCAL) {
				t1 = System.currentTimeMillis();
				m1 = Runtime.getRuntime().freeMemory();
			}
			Locale.setDefault(Locale.US);
			if (LOCAL) {
				in = new BufferedReader(new FileReader("input.txt"));
				out = new PrintWriter("output.txt");
			} else {
				in = new BufferedReader(new InputStreamReader(System.in));
				out = new PrintWriter(System.out);
			}
			tok = new StringTokenizer("");
			solve();
			in.close();
			out.close();
			if (LOCAL) {
				t2 = System.currentTimeMillis();
				m2 = Runtime.getRuntime().freeMemory();
				System.err.println("Time = " + (t2 - t1) + " ms.");
				System.err.println("Memory = " + ((m1 - m2) / 1024) + " KB.");
			}
		} catch (Throwable e) {
			e.printStackTrace(System.err);
			throw new RuntimeException();
		}
	}

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

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

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

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

	static class Mergesort {

		private Mergesort() {}

		public static void sort(int[] a) {
			mergesort(a, 0, a.length - 1);
		}

		public static void sort(long[] a) {
			mergesort(a, 0, a.length - 1);
		}

		public static void sort(double[] a) {
			mergesort(a, 0, a.length - 1);
		}

		private static final int MAGIC_VALUE = 42;

		private static void mergesort(int[] a, int leftIndex, int rightIndex) {
			if (leftIndex < rightIndex) {
				if (rightIndex - leftIndex <= MAGIC_VALUE) {
					insertionSort(a, leftIndex, rightIndex);
				} else {
					int middleIndex = (leftIndex + rightIndex) / 2;
					mergesort(a, leftIndex, middleIndex);
					mergesort(a, middleIndex + 1, rightIndex);
					merge(a, leftIndex, middleIndex, rightIndex);
				}
			}
		}

		private static void mergesort(long[] a, int leftIndex, int rightIndex) {
			if (leftIndex < rightIndex) {
				if (rightIndex - leftIndex <= MAGIC_VALUE) {
					insertionSort(a, leftIndex, rightIndex);
				} else {
					int middleIndex = (leftIndex + rightIndex) / 2;
					mergesort(a, leftIndex, middleIndex);
					mergesort(a, middleIndex + 1, rightIndex);
					merge(a, leftIndex, middleIndex, rightIndex);
				}
			}
		}

		private static void mergesort(double[] a, int leftIndex, int rightIndex) {
			if (leftIndex < rightIndex) {
				if (rightIndex - leftIndex <= MAGIC_VALUE) {
					insertionSort(a, leftIndex, rightIndex);
				} else {
					int middleIndex = (leftIndex + rightIndex) / 2;
					mergesort(a, leftIndex, middleIndex);
					mergesort(a, middleIndex + 1, rightIndex);
					merge(a, leftIndex, middleIndex, rightIndex);
				}
			}
		}

		private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
			int length1 = middleIndex - leftIndex + 1;
			int length2 = rightIndex - middleIndex;
			int[] leftArray = new int[length1];
			int[] rightArray = new int[length2];
			System.arraycopy(a, leftIndex, leftArray, 0, length1);
			System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
			for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
				if (i == length1) {
					a[k] = rightArray[j++];
				} else if (j == length2) {
					a[k] = leftArray[i++];
				} else {
					a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
				}
			}
		}

		private static void merge(long[] a, int leftIndex, int middleIndex, int rightIndex) {
			int length1 = middleIndex - leftIndex + 1;
			int length2 = rightIndex - middleIndex;
			long[] leftArray = new long[length1];
			long[] rightArray = new long[length2];
			System.arraycopy(a, leftIndex, leftArray, 0, length1);
			System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
			for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
				if (i == length1) {
					a[k] = rightArray[j++];
				} else if (j == length2) {
					a[k] = leftArray[i++];
				} else {
					a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
				}
			}
		}

		private static void merge(double[] a, int leftIndex, int middleIndex, int rightIndex) {
			int length1 = middleIndex - leftIndex + 1;
			int length2 = rightIndex - middleIndex;
			double[] leftArray = new double[length1];
			double[] rightArray = new double[length2];
			System.arraycopy(a, leftIndex, leftArray, 0, length1);
			System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
			for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
				if (i == length1) {
					a[k] = rightArray[j++];
				} else if (j == length2) {
					a[k] = leftArray[i++];
				} else {
					a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
				}
			}
		}

		private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
			for (int i = leftIndex + 1; i <= rightIndex; i++) {
				int current = a[i];
				int j = i - 1;
				while (j >= leftIndex && a[j] > current) {
					a[j + 1] = a[j];
					j--;
				}
				a[j + 1] = current;
			}
		}

		private static void insertionSort(long[] a, int leftIndex, int rightIndex) {
			for (int i = leftIndex + 1; i <= rightIndex; i++) {
				long current = a[i];
				int j = i - 1;
				while (j >= leftIndex && a[j] > current) {
					a[j + 1] = a[j];
					j--;
				}
				a[j + 1] = current;
			}
		}

		private static void insertionSort(double[] a, int leftIndex, int rightIndex) {
			for (int i = leftIndex + 1; i <= rightIndex; i++) {
				double current = a[i];
				int j = i - 1;
				while (j >= leftIndex && a[j] > current) {
					a[j + 1] = a[j];
					j--;
				}
				a[j + 1] = current;
			}
		}

	}

	void debug(Object... o) {
		if (LOCAL) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	final static boolean LOCAL = System.getProperty("ONLINE_JUDGE") == null;

//------------------------------------------------------------------------------

	void solve() throws IOException {
		int x = 0;
		int y = 0;
		int nx = readInt();
		int ny = readInt();
		if (nx == 0 && ny == 0) {
			out.println(0);
			return;
		}
		int ans = 0;
		int[] dx = {1, 0, -1, 0};
		int[] dy = {0, 1, 0, -1};
		int k = 0;
		while (true) {
			x += dx[k];
			y += dy[k];
			debug(x, y);
			if (x == nx && y == ny) {
				break;
			}
			if (x > 0 && y > 0 && x == y) {
				ans++;
				k = (k + 1) % 4;
			}
			if (x > 0 && y <= 0 && x-1 == y) {
				ans++;
				k = (k + 1) % 4;
			}
			if (x < 0 && y < 0 && x == y) {
				ans++;
				k = (k + 1) % 4;
			}
			if (x < 0 && y > 0 && -x == y) {
				ans++;
				k = (k + 1) % 4;
			}
		}
		out.println(ans);
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;

public class Main {
    private static StreamTokenizer in;
    private static PrintWriter out;
    private static BufferedReader inB;

    private static int nextInt() throws Exception{
        in.nextToken();
        return (int)in.nval;
    }

    private static String nextString() throws Exception{
        in.nextToken();
        return in.sval;
    }

    static{
        inB = new BufferedReader(new InputStreamReader(System.in));
        in = new StreamTokenizer(inB);
        out = new PrintWriter(System.out);
    }

    private static boolean was(int n) {
        char[] c = new String(n+"").toCharArray();
        for(int i = 0; i<c.length; i++) {
            if(c[i] != '0' && c[i] != '1')return false;
        }
        return true;
    }

    public static void main(String[] args)throws Exception{
        int n = nextInt();

        int count = 0;
        for(int i = 1; i<=n; i++) {
            if(was(i))count++;
        }
        System.out.println(count);
    }
}


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

public class wayhome{
  static int n;
  static int d;
  static int[] pond;
  static int[] visited;
  public static class Lily{
    int x;
    int days;
    public Lily(int a, int b){
      x = a;
      days = b;
    }
  }
  public static void bfs(){
    LinkedList<Lily> ll = new LinkedList<Lily>();
    ll.push(new Lily(0,0));
    Lily current;
    while(!ll.isEmpty()){
      current = ll.poll();
      if(current.x < 0 || current.x >= pond.length || pond[current.x] == 0 || visited[current.x] != -1){
        continue;
      }
      //System.out.println(current.days);
      if(current.x == n){
        return;
      }
      visited[current.x] = current.days;
      for(int i = 1; i <= d; i++){
        ll.push(new Lily(current.x + i, current.days + 1));
      }
    }
  }
  public static void main(String[] args) throws IOException{
    //Scanner sc = new Scanner(new File("input.in"));
    Scanenr sc = new Scanner(System.in);
    n = sc.nextInt();
    d = sc.nextInt();

    String str_pond = sc.next();
    char[] char_pond = str_pond.toCharArray();

    pond = new int[str_pond.length()];

    visited = new int[str_pond.length()];
    Arrays.fill(visited, -1);

    for(int i = 0; i < str_pond.length(); i++){
      pond[i] = Character.getNumericValue(char_pond[i]);
    }

    bfs();

    System.out.println(visited[n-1]);

    //System.out.println(Arrays.toString(pond));
    //System.out.println(Arrays.toString(visited));
    //System.out.println(pond.length);

  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class JzzhuandChildren {

	public static void main(String[] args) throws IOException {
		JzzhuandChildren main = new JzzhuandChildren();
		main.solve();
	}

	void solve() throws IOException {
		ReaderJzzhuandChildren reader = new ReaderJzzhuandChildren();
		reader.Init(System.in);
		int n = reader.NextInt();
		int m = reader.NextInt();
		List<Integer> inputs = new ArrayList<Integer>();
		List<Integer> ith = new ArrayList<Integer>();
		int temp = 0;
		for (int i = 0; i < n; i++) {
			temp = reader.NextInt();
			inputs.add(temp);
			ith.add(i+1);
		}
		int size = inputs.size();
		while (size > 1) {
			for (int i = 0; i < size; i++) {
				temp = inputs.get(i);
				if (temp > m) {
					inputs.set(i, temp-m);
				}
				else
				{
					inputs.remove(i);
					ith.remove(i);
					if(inputs.size()==1)
					{
						System.out.print(ith.get(ith.size() - 1));
						return;
					}
					size--;
					i--;
				}
			}
		}

	}
}

class ReaderJzzhuandChildren {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void Init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String Next() throws IOException {
		while (!tokenizer.hasMoreTokens()) {
			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());
	}
}


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

public class main {
    public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    public static PrintWriter pw = new PrintWriter(System.out);
    public static String line;
    public static StringTokenizer st;
    public static ArrayList<ArrayList<Integer>> adjList;

    public static void main(String[] args) throws Exception{
        st = new StringTokenizer(br.readLine());
        int a = Integer.parseInt(st.nextToken());
        int b = Integer.parseInt(st.nextToken());

        int cnt = 0;
        while(true){
            if(a >= b){
                a-=2;
                b++;
                b = Math.max(100, b);
                if(a <= 0) break;
            } else{
                b-=2;
                a++;
                a = Math.max(100, a);
                if(b <= 0) break;
            }
            cnt++;
        }
        pw.print((cnt+1) + "\n");
        pw.close();
        br.close();
    }
}


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

public class Solution {

	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = sc.nextInt();
		int[] arr = new int[n];

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

		Arrays.sort(arr);
		boolean[] done = new boolean[n];
		int left = n;
		int pile = 0;

		while(left > 0){;
			pile++;
			int count = 0;
			for(int i = 0; i < n; i++){
				if(!done[i] && arr[i] >= count){
				//	System.out.println(count+" "+arr[i]+" "+pile);
					count++;
					done[i] = true;
					left--;
				}
			}
		}

		System.out.println(pile);
	}
}


import java.util.Scanner;

public class Codeforces486A {

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

        int arr[]=new int[n];
        int t=0;
        int j=0;
        for(int i=0;i<n;i++)
        {
        	arr[i]=i+1;
        	j=(int) Math.pow(-1, i+1);
        	t= (t+(arr[i]*j));

        }
        System.out.println(t);

	}

}


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

public class Main {

	public static void main(String[] args) throws java.lang.Exception {
		BufferedReader kek = new BufferedReader(new InputStreamReader(System.in));
		//Scanner skek = new Scanner(System.in);
		PrintWriter outkek = new PrintWriter(System.out);

		int N = Integer.parseInt(kek.readLine());
		char[] input = kek.readLine().toCharArray();
		int[] sToI = new int[152];
		int[][] next = new int [152][3];
		int[][][][] posSum = new int [152][52][52][52];
		int res = 0, temp, mod = 51123987;

		for(int i = 1; i <= N; i++){
			sToI[i] = input[i-1] - 97;
		}

		int limit = (N + 2) / 3;

		next[N + 1][0] = next[N + 1][1] = next[N + 1][2] = N + 1;

		for(int i = N; i >= 1; i--){
			next[i][0] = next[i + 1][0];
			next[i][1] = next[i + 1][1];
			next[i][2] = next[i + 1][2];
			next[i][sToI[i]] = i;
		}

		posSum[1][0][0][0] = 1;

		for(int i = 0; i <= N; i++)
			for(int j = 0; j <= limit; j++)
				for(int k = 0; k <= limit; k++)
					for(int l = 0; l <= limit; l++){
						temp = posSum[i][j][k][l];

						if(j + k + l == N)
							if(Math.abs(j - k) <= 1)
								if(Math.abs(j - l) <= 1)
									if(Math.abs(k - l) <= 1){
										res += temp %= mod;
									}

						posSum[next[i][0]][j + 1][k][l] += temp %= mod;
						posSum[next[i][1]][j][k + 1][l] += temp %= mod;
						posSum[next[i][2]][j][k][l + 1] += temp %= mod;
					}

		outkek.println(res);
		kek.close();
		outkek.close();
	}

}


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

public class Main {

	public static void main(String[] args) throws java.lang.Exception {
		BufferedReader kek = new BufferedReader(new InputStreamReader(System.in));
		//Scanner skek = new Scanner(System.in);
		PrintWriter outkek = new PrintWriter(System.out);

		int N = Integer.parseInt(kek.readLine());
		char[] input = kek.readLine().toCharArray();
		int[] sToI = new int[N + 2];
		int[][] next = new int [N + 2][3];

		int limit = (N + 2) / 3;
		int[][][][] posSum = new int [N + 2][limit][limit][limit];
		int res = 0, temp, mod = 51123987;

		for(int i = 1; i <= N; i++){
			sToI[i] = input[i-1] - 97;
		}

		next[N + 1][0] = next[N + 1][1] = next[N + 1][2] = N + 1;

		for(int i = N; i >= 1; i--){
			next[i][0] = next[i + 1][0];
			next[i][1] = next[i + 1][1];
			next[i][2] = next[i + 1][2];
			next[i][sToI[i]] = i;
		}

		posSum[1][0][0][0] = 1;

		for(int i = 0; i <= N; i++)
			for(int j = 0; j <= limit; j++)
				for(int k = 0; k <= limit; k++)
					for(int l = 0; l <= limit; l++){
						temp = posSum[i][j][k][l];

						if(j + k + l == N)
							if(Math.abs(j - k) <= 1)
								if(Math.abs(j - l) <= 1)
									if(Math.abs(k - l) <= 1){
										res += temp %= mod;
									}

						posSum[next[i][0]][j + 1][k][l] += temp %= mod;
						posSum[next[i][1]][j][k + 1][l] += temp %= mod;
						posSum[next[i][2]][j][k][l + 1] += temp %= mod;
					}

		outkek.println(res);
		kek.close();
		outkek.close();
	}

}


import java.util.*;

public class Program
{
	public static void main(String[] args)
	{
		Scanner s = new Scanner(System.in);
		int a,b,c,t = 1, t0;
		boolean espera = true;
		//Console.WriteLine("Digite o tamanho dos dados/s do video :  ");
		a = s.nextInt();;
		//Console.WriteLine("Digite a capacidade de dowload de dados/s :  ");
		b = s.nextInt();;
		//Console.WriteLine("Digite o tamanho do video em segundos :  ");
		c = s.nextInt();;
		//System.out.println(a + " " + b + " " + c);

		while ( a * c > t* b ) //while (a * c > t * b)
            {
                //Console.WriteLine("tempo:" + t);

                for (t0 = 1; t0 <= t+c ; t0++)
                {

                    if ((t0)*b >= (a * c)-(t*b) && t0+t<=t+c && espera)
                    {
                        System.out.println(t);

                        t0 = t + 1;
                        espera = false;

                    }
                }
                t++;

            }

	}

}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package acmc1;

import java.util.Scanner;

/**
 *
 * @author sina
 */
public class ACMC1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner in=new Scanner(System.in);
       int n=in.nextInt();
       int[] x=new int[4*n+1];
       int[] y=new int[4*n+1];
       int maxX=0;
       int maxY=0;
       int maxOX=0;
       int maxOY=0;
       for (int i = 0; i < 4*n+1; i++) {
            x[i]=in.nextInt();
            y[i]=in.nextInt();
            if(x[i]!=y[i])
            {
                if(x[i]>=maxX)
                {
                    maxOX=maxX;
                    maxX=x[i];
                }
                if(y[i]>=maxY)
                {
                    maxOY=maxY;
                    maxY=y[i];
                }
            }
       }
       int l=Math.min(maxOX, maxOY);
       for (int i = 0; i < 4*n+1; i++) {
            if(x[i]!=l&&y[i]!=l&&x[i]!=0&&y[i]!=0)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
            else if(x[i]>l||y[i]>l)
            {
                System.out.println(x[i]+" "+y[i]);
                break;
            }
        }
    }

}


import java.util.Scanner;

public class A20 {
	public static void main(String[] args) {
		String s;
		Scanner scan = new Scanner(System.in);
		s=scan.nextLine();
		int size = s.length();
		for(int i=0;i<size;i++)
		{
			if (s.charAt(i) == '/')
			{
				System.out.print("/");
		while(s.charAt(i) == '/')
			if (i+1<size)i++;
			}
			System.out.print(s.charAt(i));

		}
	}
}


public class Romaji {
    public static void main(String[] args) {
        String s = args[0];
        if(isBerlanese(s)){
            System.out.println("NO");
        }else{
            System.out.println("YES");
        }

    }

    public static boolean isVowel(String letter) {
        boolean isVowel = false;
        if (!letter.matches("a|o|u|i|e")) {
            return isVowel;
        }
        isVowel = true;
        return isVowel;
    }

    public static boolean isBerlanese(String input) {
        boolean isBerlanese = false;
        int a = input.length();
        String lastLetter = Character.toString(input.charAt(a - 1));
        if (!isVowel(lastLetter) && !lastLetter.matches("n")) {
                isBerlanese = false;
            for (int i = 0; i < a - 1; i++) {
                String ch = Character.toString(input.charAt(i));
                String ch2 = Character.toString(input.charAt(i + 1));
                if (!isVowel(ch) && !isVowel(ch2)) {
                    isBerlanese = false;
                } else {
                    isBerlanese = true;
                }
            }
        }
        return isBerlanese;
    }

}


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 _987B {

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

  private static class Solver {
    private void solve(InputReader in, PrintWriter out) {
      int x = in.nextInt();
      int y = in.nextInt();

      if (x <= 10 && y <= 10) {
        Double ansX = Math.pow(x, y);              a
        Double ansY = Math.pow(y, x);
        if (ansX.equals(ansY)) {
          out.println("=");
        } else if (ansX > ansY) {
          out.println(">");
        } else {
          out.println("<");
        }
      } else {
        if (x == y) {
          out.println("=");
        } else if (x < y) {
          out.println(">");
        } else {
          out.println("<");
        }
      }
    }
  }

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

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

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

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

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


import static java.util.Arrays.*;
import static java.lang.Math.*;
import static java.math.BigInteger.*;
import java.util.*;
import java.math.*;
import java.io.*;

public class A implements Runnable
{
    String file = "input";

    void init() throws IOException
    {
        //input = new BufferedReader(new FileReader(file + ".in"));
        input = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new BufferedOutputStream(System.out));
    }

    void solve() throws IOException
    {
        String s = next();
        if(!s.contains("@"))
        {
            System.out.println("NO");
            return;
        }
        String[] str = s.split("@")
        if(str.length > 2)
        {
            System.out.println("NO");
            return;
        }
        if(!good(str[0]))
        {
            System.out.println("NO");
            return;
        }
        if(str[1].contains("/"))
        {
            String[] ss = str[1].split("/");
            if(ss.length != 2)
            {
                System.out.println("NO");
                return;
            }
            if(!good(ss[1]))
            {
                System.out.println("NO");
                return;
            }
            check(ss[0]);
        }
        check(str[1]);
        System.out.println("YES");
    }

    void check(String s)
    {
        if(s.length() <= 0 || s.length() > 32)
        {
            System.out.println("NO");
            System.exit(0);
        }
        String[] sss = s.split(".");
        for(int i = 0; i < sss.length; i++)
            if(!good(sss[i]))
            {
                System.out.println("NO");
                System.exit(0);
            }
    }

    boolean good(String s)
    {
        return s.length() > 0 && s.length() <= 16 && s.matches("[a-zA-Z0-9_]+");
    }

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

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

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

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

    void print(Object... o)
    {
        System.out.println(deepToString(o));
    }

    void gcj(Object o)
    {
        String s = String.valueOf(o);
        out.println("Case #" + test + ": " + s);
        System.out.println("Case #" + test + ": " + s);
    }

    BufferedReader input;
    PrintWriter out;
    StringTokenizer st;
    int test;

    public static void main(String[] args) throws IOException
    {
        new Thread(null, new A(), "", 1 << 20).start();
    }

    public void run()
    {
        try
        {
            init();
            solve();
            out.close();
        }
        catch(Exception e)
        {
            e.printStackTrace();
            System.exit(1);
        }
    }
}


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

public class Main {

    private static final class FastScanner {
        private final InputStream is = System.in;
        private final byte[] buf = new byte[8192];
        private int curChar;
        private int numChars;

        public FastScanner() {
        }

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

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

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

        public long nextLong() {
                int c;
                while (isSpaceChar(c = read())) {
                }
                boolean f = true;
                if (c == '-') {
                        f = false;
                        c = read();
                }
                long res = 0;
                do {
                        /*if (c < '0' || c > '9') {
                                throw new InputMismatchException();
                        }*/
                        res = res * 10 + c - '0';
                } while ((c = read()) >= '0' && c <= '9');
                return f ? res : -res;
        }

        public int nextInt() {
                int c;
                while (isSpaceChar(c = read())) {
                }
                boolean f = true;
                if (c == '-') {
                        f = false;
                        c = read();
                }
                int res = 0;
                do {
                        /*if (c < '0' || c > '9') {
                                throw new InputMismatchException();
                        }*/
                        res = res * 10 + c - '0';
                } while ((c = read()) >= '0' && c <= '9');
                return f ? res : -res;
        }

        public double nextDouble() {
                return Double.parseDouble(nextString());
                // return FloatingDecimal.parseDouble(nextString());
        }

        public BigInteger nextBigInteger() {
                return new BigInteger(nextString(), 10);
        }

        public BigDecimal nextBigDecimal() {
                return new BigDecimal(nextString());
        }

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

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

        public char[] nextCharArray(final int n) {
                final char[] bf = new char[n];
                int b, p = 0;
                while (isSpaceChar(b = read())) {
                }
                while (p < n && !isSpaceChar(b)) {
                        bf[p++] = (char) b;
                        b = read();
                }
                return n == p ? bf : Arrays.copyOf(bf, p);
        }

        public char[][] nextMatrix(final int n, final int m) {
                final char[][] map = new char[n][];
                for (int i = 0; i < n; i++) {
                        map[i] = nextCharArray(m);
                }
                return map;
        }

        public int[][] nextIntMatrix(final int n, final int m) {
                final int[][] map = new int[n][];
                for (int i = 0; i < n; i++) {
                        map[i] = nextArray(m);
                }
                return map;
        }

        public long[][] nextLongMatrix(final int n, final int m) {
                final long[][] map = new long[n][];
                for (int i = 0; i < n; i++) {
                        map[i] = nextLongArray(m);
                }
                return map;
        }

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

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

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

        TreeSet<Integer> set = new TreeSet<>();

        int p = (int)Math.pow(10, 9);
        for (int i = 0; i < p; i++) {
            String s = i+"";
            if(s.length() % 2 == 0) {
                if(s.matches("[47]+")) {
                    int count4 = 0;
                    int count7 = 0;
                    for (int j = 0; j < s.length(); j++) {
                        if(s.charAt(j) == '4')
                            count4++;
                        else
                            count7++;
                    }
                    if(count4 == count7)
                        set.add(Integer.parseInt(s));
                }
            }
        }

        out.println(set.higher(in.nextInt()));
        out.flush();
        out.close();

    }

}


/*
* @Author: steve
* @Date:   2015-09-22 22:21:07
* @Last Modified by:   steve
* @Last Modified time: 2015-09-23 00:04:23
*/
import java.io.*;
import java.util.*;

public class CoveredPath {

	public static int d,vf;
	public static boolean[][] esta;
	public static int[][] dp;

    public static void main(String[] args) throws Exception{
		BufferedReader entrada = new BufferedReader(new InputStreamReader(System.in));
		String[] cads = entrada.readLine().split(" ");
		int v1 = Integer.parseInt(cads[0]);
		vf = Integer.parseInt(cads[1]);
		cads = entrada.readLine().split(" ");
		int t = Integer.parseInt(cads[0]);
		d = Integer.parseInt(cads[1]);
		esta = new boolean[t+1][1000000];
		dp = new int[t+1][1000000];
		System.out.println(dp(t,v1));
    }

    public static int dp(int t, int v){
    	if(t==1)
    		return (v==vf)?vf:Integer.MIN_VALUE;
    	if(esta[t][v])
    		return dp[t][v];
    	int max=Integer.MIN_VALUE;
    	for(int i=0;i<=d;i++){
    		int dp1=v+dp(t-1,v+i);
    		if(dp1!=Integer.MIN_VALUE)
    			max=Math.max(max,dp1);
    		if(v-i>0){
    			dp1=v+dp(t-1,v-i);
    			if(dp1!=Integer.MIN_VALUE)
    				max=Math.max(max,dp1);
    		}
    	}
    	esta[t][v]=true;
    	dp[t][v]=max;
    	return max;
    }
}


import java.io.*;

public class CF3c {

    public static void main (String[] args) throws Exception
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        char[][] gameboard = new char[3][3];
        String str;
        boolean rowWin = false, colWin = false, rightDiagonal = false, leftDiagonal = false;
        boolean xWinner = false;
        boolean oWinner = false;
        int xCount = 0,  oCount = 0;
        boolean finished = true;

        for(int i = 0; i<3; i++)
        {
            str = br.readLine();
            for(int j = 0; j< 3; j++)
            {
                gameboard[i][j] = str.charAt(j);
                if(gameboard[i][j] == '.')
                    finished = false;
                if(gameboard[i][j] == 'X')
                    xCount ++;
                if(gameboard[i][j] == '0')
                    oCount ++;
            }

        }

            for(int i = 0; i<3; i++)
            {
                if(gameboard[i][0] == gameboard[i][1] && gameboard[i][0] == gameboard[i][2])
                {
                    if(gameboard[i][0] != '.')
                        rowWin = true;
                    if(gameboard[i][0] == 'X')
                        xWinner = true;
                    else if (gameboard[i][0] == '0')
                        oWinner = true;
                }
                if(gameboard[0][i] == gameboard[1][i] && gameboard[1][i] == gameboard[2][i])
                {
                    if(gameboard[0][i] != '.')
                        colWin = true;
                    if(gameboard[0][i] == 'X')
                        xWinner = true;
                    else if(gameboard[0][i] == '0')
                        oWinner = true;
                }
            }

            if(gameboard[0][0] == gameboard[1][1] && gameboard[0][0] == gameboard[2][2])
            {
                if(gameboard[0][0] != '.')
                    leftDiagonal = true;
                if(gameboard[0][0] == 'X')
                    xWinner = true;
                else if(gameboard[0][0] == '0')
                    oWinner = true;
            }

            if(gameboard[0][2] == gameboard[1][1] && gameboard[2][0] == gameboard[1][1])
            {
                if(gameboard[0][2] != '.')
                    rightDiagonal = true;
                if(gameboard[0][0] == 'X')
                    xWinner = true;
                else if(gameboard[0][0] == '0')
                    oWinner = true;
            }

            if((colWin || rowWin || leftDiagonal || rightDiagonal) && oCount <= xCount)
            {
                if(xWinner && oWinner)
                    System.out.println("illegal");
                else if(oWinner && xCount > oCount)
                    System.out.println("illegal");
                else if(xWinner && oCount >= xCount)
                    System.out.println("illegal");
                else if(xWinner && (xCount - oCount > 1))
                    System.out.println("illegal");
                else if(xWinner)
                    System.out.println("the first player won");
                else
                    System.out.println("the second player won");
            }

             else
                {
                if(finished && (xCount - oCount == 1))
                    System.out.println("draw");
                else if(xCount > oCount && (xCount - oCount <= 1))
                    System.out.println("second");
                else if(xCount < oCount || (xCount - oCount > 1))
                    System.out.println("illegal");
                else
                    System.out.println("first");
                }

    }
}


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.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.StringTokenizer;

public class Template {

    static class Solver {
        public void solve(InputReader in, PrintWriter out) {
        		int a1 = in.nextInt();
            int counter = 1;
        		ArrayList<Integer> t = new ArrayList<Integer>();

        		for (int i = 0; i < a1 ; i++) {
                for (int j = 0; j < 6 ; j++) {
                		t.add(in.nextInt());

                }
             }

        		if(a1==2) {

	        		for (int i = 0; i < 6; i++) {
	        			for (int j = 0; j < 6; i++) {
		        			t.add((t.get(i)*10)+t.get(j+6));
		        			t.add((t.get(j+6)*10)+t.get(i));
	        			}
	        		}
        		}

        		if(a1==3) {

	        		for (int i = 0; i < 6; i++) {
	        			for (int j = 0; j < 6; j++) {

	        				t.add((t.get(i)*10)+t.get(j+6));
		        			t.add((t.get(j+6)*10)+t.get(i));
	        			}
	        		}
	        		for (int i = 0; i < 6; i++) {
	        			for (int j = 0; j < 6; j++) {

	        				t.add((t.get(i+6)*10)+t.get(j+12));
	            			t.add((t.get(j+12)*10)+t.get(i+6));

	        			}
	        		}
	        		for (int i = 0; i < 6; i++) {
	        			for (int j = 0; j < 6; j++) {

	        				t.add((t.get(i)*10)+t.get(j+12));
	            			t.add((t.get(j+12)*10)+t.get(i));

	        			}
	        		}

        		}

        		Collections.sort(t);

        		while(counter<=100 && t.contains(counter) ) {
        			counter++;
			}

        		if(!t.contains(1)) {
        			counter = 0;
        		}else{
        			counter--;
        		}

        		out.print(counter);

        }
    }

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();

    }

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


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

public class LaraCroftAndTheNewGame {

    public static void solve(int row, int col, int steps) {
        int x = 1;
        int y = 1;
        int counter = 0;
        class Direction {
            private int dx;
            private int dy;

            public Direction(int dx, int dy) {
                this.dx = dx;
                this.dy = dy;
            }

            public int getDx() {
                return dx;
            }

            public int getDy() {
                return dy;
            }
        }

        Direction up = new Direction(-1, 0);
        Direction down = new Direction(1, 0);
        Direction left = new Direction(0, -1);
        Direction right = new Direction(0, 1);
        LinkedList<Direction> se = new LinkedList<Direction>();
        for (int i = 0; i < row - 1; i++) {
            se.add(new Direction(1, 0));
        }
        se.add(new Direction(0, 1));
        for (int i = 0; i < row / 2 + 1; i++) {
            for (int i1 = 0; i1 < col - 2; i1++) {
                se.add(new Direction(0, 1));
            }
            se.add(new Direction(-1, 0));
            for (int i1 = 0; i1 < col - 2; i1++) {
                se.add(new Direction(0, -1));
            }
            se.add(new Direction(-1, 0));
        }
        while(steps > 0) {
            Direction solo = se.poll();
            x += solo.getDx();
            y += solo.getDy();
            steps--;
        }
        System.out.println(x + " " + y);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int row = scanner.nextInt();
        int col = scanner.nextInt();
        int steps = scanner.nextInt();
        LaraCroftAndTheNewGame.solve(row, col, steps);
    }
}


package com.company;

import java.util.Scanner;

public class Main {

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

        a *= 2;
        b *= 2;

        parity1 = x1;
        parity2 = y1;
        x1 = parity1 + parity2;
        y1 = parity2 - parity1;

        parity1 = x2;
        parity2 = y2;
        x2 = parity1 + parity2;
        y2 = parity2 - parity1;

        if
                (x1>0) x1 = x1/a+1;
        else
            x1 = x1/a;

        if
                (x2>0) x2 = x2/a+1;
        else
            x2 = x2/a;

        if
                (y1>0)  y1 = y1/b+1;
        else
            y1 = y1/b;

        if
                (y2>0)  y2 = y2/b+1;
        else
            y2 = y2/b;

        System.out.println(Math.max(Math.abs((x2-x1)),Math.abs((y2-y1))));
    }
}


import java.util.*;
public class Task {
	public static void main(String [] args){
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int resultofB = (b/a);
		int resultofC = (c/a);
		if (b<a && c<a){
			System.out.println(-1);
		}else if(c < a)
			System.out.println(b%a==0 ? resultofB : -1);
		}
		}else if (b < a){
			System.out.println(c%a==0 ? resultofC : -1);
		}
		else{
			System.out.println(resultofB + resultofC);
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;

public class CowsandPrimitiveRoots_CodeForces {

	public static BigInteger pow(int a , int e){ // calculates a power e
		BigInteger ans = new BigInteger(1+"");
		BigInteger A = new BigInteger(a+"");
		while(e>0){
			if(e%2==1)
				//ans*=a;
				ans = ans.multiply(A);
			//a*=a;
			A=A.multiply(A);
			e>>=1;
		}
		return ans;
	}
	public static boolean isDiv(int b ,int pow, int mod){
		return b%mod==0;
	}
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		int p = Integer.parseInt(br.readLine());
		int count=p-2;

		for(int i=2;i<p;i++){
			int pow = p-2;
			//if((pow(i,p-1)-1)%p<=0){
			if((pow(i,p-1).subtract(new BigInteger(1+""))).mod(new BigInteger(p+"")).compareTo(new BigInteger("0"))<=0){
			for(int j=1;j<=pow;j++){
				if((pow(i,j).subtract(new BigInteger(1+""))).mod(new BigInteger(p+"")).compareTo(new BigInteger("0"))<=0){
				//if((pow(i, j)-1)%p<=0){
						//System.out.println((pow(i, j)-1));
						count--;
						break;
					}
				}
			}
			else {
				count--;
				//System.out.println("heree  "+ (pow(i,p-1)-1)%p);
			}
		}

		out.println(count);
		out.flush();
		out.close();
	}

}


package com.jardon.pg.algorithm.codeforce.r4xx.r482;

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

/**
 * @author Don Li
 */
public class KuroAndTopologicalParity2 {

    int MOD = (int) 1e9 + 7;
    int N = 55;

    long[] p2 = new long[N];
    long[][] c = new long[N][N];
    long[][] cs = new long[N][2];

    long[][][] dp = new long[N][N][N];

    {
        p2[0] = 1;
        for (int i = 1; i < N; i++) p2[i] = p2[i - 1] * 2 % MOD;

        for (int i = 0; i < N; i++) {
            c[i][0] = 1;
            for (int j = 1; j <= i; j++) c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD;
        }

        for (int i = 0; i < N; i++) {
            for (int j = 0; j <= i; j++) {
                cs[i][j & 1] = (cs[i][j & 1] + c[i][j]) % MOD;
            }
        }
    }

    void solve() {
        int n = in.nextInt(), p = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = in.nextInt();

        long ans = 0;
        dp[0][0][0] = 1;
        for (int i = 0; i < n; i++) {
            for (int ob = 0; ob <= i + 1; ob++) {
                for (int ow = 0; ob + ow <= i + 1; ow++) {
                    if (a[i] != 0 && i - ob >= 0) dp[i + 1][ob][ow] += dp[i][ob][ow] * p2[i - ob] * cs[ob][1];
                    if (a[i] != 0 && ow - 1 >= 0) dp[i + 1][ob][ow] += dp[i][ob][ow - 1] * p2[i - ob] * cs[ob][0];
                    if (a[i] != 1 && i - ow >= 0) dp[i + 1][ob][ow] += dp[i][ob][ow] * p2[i - ow] * cs[ow][1];
                    if (a[i] != 1 && ob - 1 >= 0) dp[i + 1][ob][ow] += dp[i][ob - 1][ow] * p2[i - ow] * cs[ow][0];
                    if (i + 1 == n && ((ob + ow) & 1) == p) ans += dp[i + 1][ob][ow];
                }
            }
        }
        out.println(ans);
    }

    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new KuroAndTopologicalParity2().solve();
        out.close();
    }

    static FastScanner in;
    static PrintWriter out;

    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;

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

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

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

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

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


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.io.Closeable;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws Exception {
        Thread thread = new Thread(null, new TaskAdapter(), "", 1 << 27);
        thread.start();
        thread.join();
    }

    static class TaskAdapter implements Runnable {
        @Override
        public void run() {
            InputStream inputStream = System.in;
            OutputStream outputStream = System.out;
            FastInput in = new FastInput(inputStream);
            FastOutput out = new FastOutput(outputStream);
            EKuroAndTopologicalParity solver = new EKuroAndTopologicalParity();
            solver.solve(1, in, out);
            out.close();
        }
    }

    static class EKuroAndTopologicalParity {
        public void solve(int testNumber, FastInput in, FastOutput out) {
            int n = in.readInt();
            int p = in.readInt();

            Modular mod = new Modular(1e9 + 7);
            CachedPow pow = new CachedPow(2, n, mod);

            int[][][][] dp = new int[n + 1][2][2][2];
            dp[0][0][0][0] = 1;

            for (int i = 1; i <= n; i++) {
                int c = in.readInt();

                for (int j = 0; j < 2; j++) {
                    for (int k = 0; k < 2; k++) {
                        for (int t = 0; t < 2; t++) {
                            int cnt = i - 2 >= 0 ? pow.pow(i - 2) : 1;

                            if (c != 1 && k == 1) {
                                //pick odd
                                if (t == 1) {
                                    dp[i][j][k][t] = mod.plus(dp[i][j][k][t], mod.mul(mod.plus(dp[i - 1][j][1][t], dp[i - 1][j][0][t]), cnt));
                                }
                                //pick even
                                dp[i][j][k][t] = mod.plus(dp[i][j][k][t], mod.mul(mod.plus(dp[i - 1][1 - j][1][t], dp[i - 1][1 - j][0][t]), cnt));
                            }
                            if (c != 0 && t == 1) {
                                //pick odd
                                if (k == 1) {
                                    dp[i][j][k][t] = mod.plus(dp[i][j][k][t], mod.mul(mod.plus(dp[i - 1][j][k][1], dp[i - 1][j][k][0]), cnt));
                                }
                                //pick even
                                dp[i][j][k][t] = mod.plus(dp[i][j][k][t], mod.mul(mod.plus(dp[i - 1][1 - j][k][1], dp[i - 1][1 - j][k][0]), cnt));
                            }
                        }
                    }
                }
            }

            int ans = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < 2; j++) {
                    ans = mod.plus(dp[n][p][i][j], ans);
                }
            }

            out.println(ans);
        }

    }

    static class FastOutput implements AutoCloseable, Closeable {
        private StringBuilder cache = new StringBuilder(10 << 20);
        private final Writer os;

        public FastOutput(Writer os) {
            this.os = os;
        }

        public FastOutput(OutputStream os) {
            this(new OutputStreamWriter(os));
        }

        public FastOutput println(int c) {
            cache.append(c).append('\n');
            return this;
        }

        public FastOutput flush() {
            try {
                os.append(cache);
                os.flush();
                cache.setLength(0);
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
            return this;
        }

        public void close() {
            flush();
            try {
                os.close();
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }

        public String toString() {
            return cache.toString();
        }

    }

    static class Modular {
        int m;

        public int getMod() {
            return m;
        }

        public Modular(int m) {
            this.m = m;
        }

        public Modular(long m) {
            this.m = (int) m;
            if (this.m != m) {
                throw new IllegalArgumentException();
            }
        }

        public Modular(double m) {
            this.m = (int) m;
            if (this.m != m) {
                throw new IllegalArgumentException();
            }
        }

        public int valueOf(int x) {
            x %= m;
            if (x < 0) {
                x += m;
            }
            return x;
        }

        public int valueOf(long x) {
            x %= m;
            if (x < 0) {
                x += m;
            }
            return (int) x;
        }

        public int mul(int x, int y) {
            return valueOf((long) x * y);
        }

        public int plus(int x, int y) {
            return valueOf(x + y);
        }

        public Modular getModularForPowerComputation() {
            return new Modular(m - 1);
        }

        public String toString() {
            return "mod " + m;
        }

    }

    static class CachedPow {
        private int[] first;
        private int[] second;
        private Modular mod;
        private Modular powMod;

        public CachedPow(int x, Modular mod) {
            this(x, mod.getMod(), mod);
        }

        public CachedPow(int x, int maxExp, Modular mod) {
            this.mod = mod;
            this.powMod = mod.getModularForPowerComputation();
            int k = Math.max(1, (int) DigitUtils.round(Math.sqrt(maxExp)));
            first = new int[k];
            second = new int[maxExp / k + 1];
            first[0] = 1;
            for (int i = 1; i < k; i++) {
                first[i] = mod.mul(x, first[i - 1]);
            }
            second[0] = 1;
            int step = mod.mul(x, first[k - 1]);
            for (int i = 1; i < second.length; i++) {
                second[i] = mod.mul(second[i - 1], step);
            }
        }

        public int pow(int exp) {
            return mod.mul(first[exp % first.length], second[exp / first.length]);
        }

    }

    static class DigitUtils {
        private DigitUtils() {
        }

        public static long round(double x) {
            if (x >= 0) {
                return (long) (x + 0.5);
            } else {
                return (long) (x - 0.5);
            }
        }

    }

    static class FastInput {
        private final InputStream is;
        private byte[] buf = new byte[1 << 13];
        private int bufLen;
        private int bufOffset;
        private int next;

        public FastInput(InputStream is) {
            this.is = is;
        }

        private int read() {
            while (bufLen == bufOffset) {
                bufOffset = 0;
                try {
                    bufLen = is.read(buf);
                } catch (IOException e) {
                    bufLen = -1;
                }
                if (bufLen == -1) {
                    return -1;
                }
            }
            return buf[bufOffset++];
        }

        public void skipBlank() {
            while (next >= 0 && next <= 32) {
                next = read();
            }
        }

        public int readInt() {
            int sign = 1;

            skipBlank();
            if (next == '+' || next == '-') {
                sign = next == '+' ? 1 : -1;
                next = read();
            }

            int val = 0;
            if (sign == 1) {
                while (next >= '0' && next <= '9') {
                    val = val * 10 + next - '0';
                    next = read();
                }
            } else {
                while (next >= '0' && next <= '9') {
                    val = val * 10 - next + '0';
                    next = read();
                }
            }

            return val;
        }

    }
}


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String input = in.nextLine();
        System.out.println(isMagicNumber(input)? "YES" : "NO");
    }

    private static boolean isMagicNumber(String input) {
        return isMagicNumberRec(0, input);
    }

    private static boolean isMagicNumberRec(int idx, String input) {
        if (idx == input.length()+1){
            return true;
        }

        boolean isMagic1 = input.substring(idx,idx+1).equals("1");
        boolean isMagic2=false;
        boolean isMagic3=false;

        if (idx+2<=input.length()) {
            isMagic2 = input.substring(idx,idx+ 2).equals("14");
        }
        if (idx+3<=input.length()) {
            isMagic3 = input.substring(idx, idx+3).equals("144");
        }

        boolean sum = false;

            if (isMagic1){
                sum |= isMagicNumberRec(idx+=1, input);
            }
            if (isMagic2){
                sum |= isMagicNumberRec(idx+=2, input);
            }
            if (isMagic3){
                sum |= isMagicNumberRec(idx+=3, input);
            }

        return sum;
    }

}


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

import static java.lang.Math.*;

public class solver implements Runnable {

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

    void init() throws FileNotFoundException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }

    String readString() {
        try {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine());
                } catch (Exception e) {
                    return null;
                }
            }
            return tok.nextToken();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

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

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

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

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

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            // time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    int cntm(int[] a, int x) {
        int l = 0;
        int r = a.length - 1;
        int ans = -1;
        while (l <= r) {
            int mid = (l + r) / 2;
            if (a[mid] > x) {
                r = mid - 1;
            } else {
                ans = mid;
                l = mid + 1;
            }
        }
        return ans + 1;
    }

    void no() {
        out.println("NO");
        out.close();
        System.exit(0);
    }

    void yes() {
        out.println("YES");
        out.close();
        System.exit(0);
    }

    void solve() {
        int n = readInt();
        int R = readInt();
        int r = readInt();

        if (R < r) no();
        if (n == 1) {if (R < r) no(); else yes();}
        double sector = Math.asin((double)r / (R - r)) * 2;
        double all = n * sector;
        if (all - 1e-10 < 2 * Math.PI)
            yes();
        else
            no();
    }
}import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class solver implements Runnable {

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

    void init() throws FileNotFoundException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }

    String readString() {
        try {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine());
                } catch (Exception e) {
                    return null;
                }
            }
            return tok.nextToken();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

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

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

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

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

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            // time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    int cntm(int[] a, int x) {
        int l = 0;
        int r = a.length - 1;
        int ans = -1;
        while (l <= r) {
            int mid = (l + r) / 2;
            if (a[mid] > x) {
                r = mid - 1;
            } else {
                ans = mid;
                l = mid + 1;
            }
        }
        return ans + 1;
    }

    void no() {
        out.println("NO");
        out.close();
        System.exit(0);
    }

    void yes() {
        out.println("YES");
        out.close();
        System.exit(0);
    }

    void solve() {
        int n = readInt();
        int R = readInt();
        int r = readInt();

        if (R < r) no();
        if (n == 1) {if (R >= r) no(); else yes();}
        double sector = Math.asin((double)r / (R - r)) * 2;
        double all = n * sector;
        if (all - 1e-10 < 2 * Math.PI)
            yes();
        else
            no();
    }
}


package main;

import main.Parser;
import main.OutputWriter;

public class TaskD {
    int mod = 1000000007;
    long[][] sum1d = new long[3000][3000];
    long[][] sum2d = new long[3000][3000];

    public void solve(int testNumber, Parser in, OutputWriter out) {
        int n = in.nextInt();
        int m = in.nextInt();

        for (int rows = 0; rows <= n; rows++) {
            for (int i = 2; i <= m; i++) {
                sum1d[rows][i] = (rows==0) ? 1 : sum2d[rows-1][i]+1;
                if (i != 0) sum1d[rows][i] += sum1d[rows][i-1];

                sum2d[rows][i] = sum1d[rows][i];
                if (i != 0) sum2d[rows][i] += sum2d[rows][i-1];
            }
        }

        long tot = 0;
        for (int i = 0; i < n; i++) {
            for (int mid = 2; mid <= m; mid++) {
                // res=(res+(((((pd[w][t][1]-pd[w][t-1][1]+M)%M)*pd[w][n-t+1][1])%M)*(m-w+1))%M)%M;
                long top = (i==0) ? 1 : (sum2d[i-1][mid-1]+sum1d[i-1][mid-1]+1);
                long bot = (n-i-1==0) ? 1 : sum2d[n-i-2][mid]+1;

                bot = (bot * top) % mod;
                bot = (bot * (m-mid+1)) % mod;
                tot = (tot + bot) % mod;
            }
        }

        out.println(tot);
    }
}


import java.util.InputMismatchException;
import java.math.BigInteger;
import java.util.Collection;
import java.util.ArrayList;
import java.util.List;
import java.util.Comparator;
import java.io.*;
import java.util.Iterator;
import java.util.Arrays;

/**
 * Generated by Contest helper plug-in
 * Actual solution is at the bottom
 */
public class Main {
	public static void main(String[] args) {
		InputReader in = new StreamInputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);
		run(in, out);
	}

	public static void run(InputReader in, PrintWriter out) {
		Solver solver = new TaskD();
		solver.solve(1, in, out);
		Exit.exit(in, out);
	}
}

abstract class InputReader {
	private boolean finished = false;

	public abstract int read();

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

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

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

	public void setFinished(boolean finished) {
		this.finished = finished;
	}

	public abstract void close();
}

class StreamInputReader extends InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar, numChars;

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

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

	public void close() {
		try {
			stream.close();
		} catch (IOException ignored) {
		}
	}
}

class Exit {
	private Exit() {
	}

	public static void exit(InputReader in, PrintWriter out) {
		in.setFinished(true);
		in.close();
		out.close();
	}
}

interface Solver {
	public void solve(int testNumber, InputReader in, PrintWriter out);
}

class IntegerUtils {

	public static long power(long base, long exponent, long mod) {
		if (exponent == 0)
			return 1;
		long result = power(base, exponent >> 1, mod);
		result = result * result % mod;
		if ((exponent & 1) != 0)
			result = result * base % mod;
		return result;
	}

	}

class TaskD implements Solver {
	private static final int MOD = 1000000007;

	public void solve(int testNumber, InputReader in, PrintWriter out) {
		int rowCount = in.readInt();
		int columnCount = in.readInt();
		int colorCount = in.readInt();
		if (colorCount == 1) {
			out.println(IntegerUtils.power(colorCount, rowCount, MOD));
			return;
		}
		long[][] variants = new long[rowCount + 1][rowCount + 1];
		variants[0][0] = 1;
		for (int i = 1; i <= rowCount; i++) {
			for (int j = 1; j <= i; j++)
				variants[i][j] = (variants[i - 1][j - 1] + variants[i - 1][j] * j) % MOD;
		}
		long[] factorial = new long[rowCount + 1];
		factorial[0] = 1;
		for (int i = 0; i < rowCount; i++)
			factorial[i + 1] = (factorial[i] * (i + 1)) % MOD;
		long[] reverse = new long[rowCount + 2];
		for (int i = 1; i <= rowCount + 1; i++)
			reverse[i] = BigInteger.valueOf(i).modInverse(BigInteger.valueOf(MOD)).longValue();
		long baseCount = 1;
		int exponent = (columnCount - 2) * rowCount;
		long result = 0;
		for (int i = 0; i <= rowCount && i <= colorCount; i++) {
			long curBaseCount = baseCount;
			for (int j = 0; i + j <= rowCount && i + 2 * j <= colorCount; j++) {
				result += variants[rowCount][i + j] * variants[rowCount][i + j] % MOD * curBaseCount % MOD * IntegerUtils.power(i, exponent, MOD) % MOD * factorial[i + j] % MOD * factorial[i + j] % MOD;
				curBaseCount = curBaseCount * reverse[j + 1] % MOD;
				curBaseCount = curBaseCount * (colorCount - i - 2 * j) % MOD;
				curBaseCount = curBaseCount * (colorCount - i - 2 * j - 1) % MOD;
				curBaseCount = curBaseCount * reverse[j + 1] % MOD;
			}
			baseCount = (baseCount * (colorCount - i)) % MOD;
			baseCount = baseCount * reverse[i + 1] % MOD;
		}
		out.println(result % MOD);
	}
}


package codeforces.contest678;

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

public class B {
  private static class Task {
    void solve(FastScanner in, PrintWriter out) {
      int y = in.nextInt();
      int y_origin = y;
      long days = 0;
      while (true) {
        days += 365;
        if (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0)) {
          days++;
        }
        y++;
        if (days % 7 == 0 && is_uruu(y) == is_uruu(y_origin)) {
          out.println(y);
          return;
        }

      }
    }

    boolean is_uruu(int y) {
      return (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0));
    }
  }

  public static void main(String[] args) {
    OutputStream outputStream = System.out;
    FastScanner in = new FastScanner();
    PrintWriter out = new PrintWriter(outputStream);
    Task solver = new Task();
    solver.solve(in, out);
    out.close();
  }

  private static class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int bufferLength = 0;

    private boolean hasNextByte() {
      if (ptr < bufferLength) {
        return true;
      } else {
        ptr = 0;
        try {
          bufferLength = in.read(buffer);
        } catch (IOException e) {
          e.printStackTrace();
        }
        if (bufferLength <= 0) {
          return false;
        }
      }
      return true;
    }

    private int readByte() {
      if (hasNextByte()) return buffer[ptr++];
      else return -1;
    }

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

    private void skipUnprintable() {
      while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
    }

    boolean hasNext() {
      skipUnprintable();
      return hasNextByte();
    }

    public String next() {
      if (!hasNext()) throw new NoSuchElementException();
      StringBuilder sb = new StringBuilder();
      int b = readByte();
      while (isPrintableChar(b)) {
        sb.appendCodePoint(b);
        b = readByte();
      }
      return sb.toString();
    }

    long nextLong() {
      if (!hasNext()) throw new NoSuchElementException();
      long n = 0;
      boolean minus = false;
      int b = readByte();
      if (b == '-') {
        minus = true;
        b = readByte();
      }
      if (b < '0' || '9' < b) {
        throw new NumberFormatException();
      }
      while (true) {
        if ('0' <= b && b <= '9') {
          n *= 10;
          n += b - '0';
        } else if (b == -1 || !isPrintableChar(b)) {
          return minus ? -n : n;
        } else {
          throw new NumberFormatException();
        }
        b = readByte();
      }
    }

    public int nextInt() {
      return (int) nextLong();
    }
  }
}


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

public class NumberList {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] line1 = br.readLine().split(" ");
		int n = Integer.parseInt(line1[0]);
		int x = Integer.parseInt(line1[1]);
		int y = Integer.parseInt(line1[2]);
		String[] in = br.readLine().split(" ");
		int[] list = new int[n];
		for (int i = 0; i < n; i++) {
			list[i] = Integer.parseInt(in[i]);
		}
		ArrayList<Integer> primes = primeSieve();
		int[] costs = new int[primes.size()];
		for (int i = 0; i < list.length; i++) {
			for (int j = 0; j < primes.size(); j++) {
				costs[j]+=Math.min(x, y*list[i]%primes.get(j));
			}
		}
		System.out.println(Arrays.stream(list).min());
	}

	// returns an int ArrayList of primes up to 10^9
	public static ArrayList<Integer> primeSieve() {
		int max = 1000000001;
		boolean[] isPrime = new boolean[max];
		Arrays.fill(isPrime, true);
		for (int i = 2; i < isPrime.length; i++) {
			if (isPrime[i]) {
				for (int j = 2 * i; j < isPrime.length; j += i) {
					isPrime[j] = false;
				}
			}
		}
		ArrayList<Integer> primes = new ArrayList<Integer>();
		for (int i = 2; i < isPrime.length; i++) {
			if (isPrime[i]) {
				primes.add(i);
			}
		}
		return primes;
	}
}