
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		//		new Main().solveB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private int getFunc(int x) {
		int res = 0;
		while (x % 100 == 0) {
			x = x / 100;
			res++;
		}
		return res;
	}

	private int getFuncSaiki(int x) {
		if (x % 100 != 0) {
			return 0;
		}
		return getFuncSaiki(x / 100) + 1;
	}

	private void solveB2() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private long dpSolveC(long[] wk) {
		int cnt = 0;
		for (int i = 0; i < wk.length; i++) {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		}
		return cnt;

	}

	/**
	 * a[i]の操作終了条件は「2で割れなくなったとき」
	 * a[i]を3倍しても「2で割る事の出来る回数は増えない」
	 * そのため、a[i]を2で割れる回数の総計が操作可能回数。
	 */
	private void solveC() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		//		new Main().solveB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private int getFunc(int x) {
		int res = 0;
		while (x % 100 == 0) {
			x = x / 100;
			res++;
		}
		return res;
	}

	private int getFuncSaiki(int x) {
		if (x % 100 != 0) {
			return 0;
		}
		return getFuncSaiki(x / 100) + 1;
	}

	private void solveB2() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private long dpSolveC(long[] wk) {
		int cnt = 0;
		for (int i = 0; i < wk.length; i++) {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		}
		return cnt;

	}

	/**
	 * a[i]の操作終了条件は「2で割れなくなったとき」
	 * a[i]を3倍しても「2で割る事の出来る回数は増えない」
	 * そのため、a[i]を2で割れる回数の総計が操作可能回数。
	 */
	private void solveC() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} Main public static void main(String[] args) {
		//		new Main().solveA();
		//		new Main().solveB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	} main {
		//		new Main().solveA();
		//		new Main().solveB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	} new Main().solveB2() new Main().solveB2 new Main() String[] args args private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveA {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numA = 0; numA 0 int numB = 0; numB 0 try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numA = scanner.nextInt() numA scanner.nextInt() scanner.nextInt scanner numB = scanner.nextInt() numB scanner.nextInt() scanner.nextInt scanner if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			} numA > 16 / 2 || numB > 16 / 2 numA > 16 / 2 numA 16 / 2 16 2 numB > 16 / 2 numB 16 / 2 16 2 {
				System.out.println(":(");
				return;
			} System.out.println(":(") System.out.println System.out System System.out ":(" return; System.out.println("Yay!") System.out.println System.out System System.out "Yay!" private void solveB() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveB {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numD = 0; numD 0 int numN = 0; numN 0 try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numD = scanner.nextInt() numD scanner.nextInt() scanner.nextInt scanner numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner if (numN == 100) {
				numN++;
			} numN == 100 numN 100 {
				numN++;
			} numN++ numN switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			} numD case 0: 0 case 0: System.out.println(numN) System.out.println System.out System System.out numN break; case 1: 1 case 1: System.out.println(numN * 100) System.out.println System.out System System.out numN * 100 numN 100 break; case 2: 2 case 2: System.out.println(numN * 10000) System.out.println System.out System System.out numN * 10000 numN 10000 break; default: default: break; private int getFunc(int x) {
		int res = 0;
		while (x % 100 == 0) {
			x = x / 100;
			res++;
		}
		return res;
	} getFunc {
		int res = 0;
		while (x % 100 == 0) {
			x = x / 100;
			res++;
		}
		return res;
	} int res = 0; res 0 while (x % 100 == 0) {
			x = x / 100;
			res++;
		} x % 100 == 0 x % 100 x 100 0 {
			x = x / 100;
			res++;
		} x = x / 100 x x / 100 x 100 res++ res return res; res int x x private int getFuncSaiki(int x) {
		if (x % 100 != 0) {
			return 0;
		}
		return getFuncSaiki(x / 100) + 1;
	} getFuncSaiki {
		if (x % 100 != 0) {
			return 0;
		}
		return getFuncSaiki(x / 100) + 1;
	} if (x % 100 != 0) {
			return 0;
		} x % 100 != 0 x % 100 x 100 0 {
			return 0;
		} return 0; 0 return getFuncSaiki(x / 100) + 1; getFuncSaiki(x / 100) + 1 getFuncSaiki(x / 100) getFuncSaiki x / 100 x 100 1 int x x private void solveB2() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveB2 {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numD = 0; numD 0 int numN = 0; numN 0 try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numD = scanner.nextInt() numD scanner.nextInt() scanner.nextInt scanner numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 int val = 0; val 0 while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			} count != numN count numN {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			} val++ val if (getFunc(val) == numD) {
					count++;
				} getFunc(val) == numD getFunc(val) getFunc val numD {
					count++;
				} count++ count System.out.println(val) System.out.println System.out System System.out val private long dpSolveC(long[] wk) {
		int cnt = 0;
		for (int i = 0; i < wk.length; i++) {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		}
		return cnt;

	} dpSolveC {
		int cnt = 0;
		for (int i = 0; i < wk.length; i++) {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		}
		return cnt;

	} int cnt = 0; cnt 0 for (int i = 0; i < wk.length; i++) {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		} int i = 0; int i = 0; i 0 i < wk.length i wk.length wk wk.length i++ i++ i {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		} {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		} long wkNum = wk[i]; wkNum wk[i] wk i while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			} wkNum % 2 == 0 wkNum % 2 wkNum 2 0 {
				wkNum /= 2;
				cnt++;
			} wkNum /= 2 wkNum 2 cnt++ cnt return cnt; cnt long[] wk wk /**
	 * a[i]の操作終了条件は「2で割れなくなったとき」
	 * a[i]を3倍しても「2で割る事の出来る回数は増えない」
	 * そのため、a[i]を2で割れる回数の総計が操作可能回数。
	 */
	private void solveC() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveC {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numN = 0; numN 0 try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner long[] wk = new long[numN]; wk new long[numN] numN for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			} int i = 0; int i = 0; i 0 i < wk.length i wk.length wk wk.length i++ i++ i {
				wk[i] = scanner.nextLong();
			} {
				wk[i] = scanner.nextLong();
			} wk[i] = scanner.nextLong() wk[i] wk i scanner.nextLong() scanner.nextLong scanner System.out.println(dpSolveC(wk)) System.out.println System.out System System.out dpSolveC(wk) dpSolveC wk private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveD {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numN = 0; numN 0 int numK = 0; numK 0 int numS = 0; numS 0 try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner System.out.println("") System.out.println System.out System System.out "" public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		//		new Main().solveB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private int getFunc(int x) {
		int res = 0;
		while (x % 100 == 0) {
			x = x / 100;
			res++;
		}
		return res;
	}

	private int getFuncSaiki(int x) {
		if (x % 100 != 0) {
			return 0;
		}
		return getFuncSaiki(x / 100) + 1;
	}

	private void solveB2() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private long dpSolveC(long[] wk) {
		int cnt = 0;
		for (int i = 0; i < wk.length; i++) {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		}
		return cnt;

	}

	/**
	 * a[i]の操作終了条件は「2で割れなくなったとき」
	 * a[i]を3倍しても「2で割る事の出来る回数は増えない」
	 * そのため、a[i]を2で割れる回数の総計が操作可能回数。
	 */
	private void solveC() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		//		new Main().solveB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private int getFunc(int x) {
		int res = 0;
		while (x % 100 == 0) {
			x = x / 100;
			res++;
		}
		return res;
	}

	private int getFuncSaiki(int x) {
		if (x % 100 != 0) {
			return 0;
		}
		return getFuncSaiki(x / 100) + 1;
	}

	private void solveB2() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private long dpSolveC(long[] wk) {
		int cnt = 0;
		for (int i = 0; i < wk.length; i++) {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		}
		return cnt;

	}

	/**
	 * a[i]の操作終了条件は「2で割れなくなったとき」
	 * a[i]を3倍しても「2で割る事の出来る回数は増えない」
	 * そのため、a[i]を2で割れる回数の総計が操作可能回数。
	 */
	private void solveC() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		//		new Main().solveB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			if (numA > 16 / 2 || numB > 16 / 2) {
				System.out.println(":(");
				return;
			}

			System.out.println("Yay!");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();
			if (numN == 100) {
				numN++;
			}
			switch (numD) {
			case 0:
				System.out.println(numN);
				break;
			case 1:
				System.out.println(numN * 100);
				break;
			case 2:
				System.out.println(numN * 10000);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private int getFunc(int x) {
		int res = 0;
		while (x % 100 == 0) {
			x = x / 100;
			res++;
		}
		return res;
	}

	private int getFuncSaiki(int x) {
		if (x % 100 != 0) {
			return 0;
		}
		return getFuncSaiki(x / 100) + 1;
	}

	private void solveB2() {
		Scanner scanner = null;
		int numD = 0;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numD = scanner.nextInt();
			numN = scanner.nextInt();

			int count = 0;
			int val = 0;

			while (count != numN) {
				val++;
				if (getFunc(val) == numD) {
					count++;
				}
			}
			System.out.println(val);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private long dpSolveC(long[] wk) {
		int cnt = 0;
		for (int i = 0; i < wk.length; i++) {
			long wkNum = wk[i];
			while (wkNum % 2 == 0) {
				wkNum /= 2;
				cnt++;
			}
		}
		return cnt;

	}

	/**
	 * a[i]の操作終了条件は「2で割れなくなったとき」
	 * a[i]を3倍しても「2で割る事の出来る回数は増えない」
	 * そのため、a[i]を2で割れる回数の総計が操作可能回数。
	 */
	private void solveC() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			long[] wk = new long[numN];

			for (int i = 0; i < wk.length; i++) {
				wk[i] = scanner.nextLong();
			}

			System.out.println(dpSolveC(wk));

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
}