import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); sc.close(); int[] a = new int[n]; a[0] = m; long ans = m; for (int i = 1; i < n; i++) { if (a[i - 1] % 2 == 0) { a[i] = a[i - 1] / 2; } else { a[i] = a[i - 1] / 2 + 1; } ans += a[i]; } System.out.println(ans); } }