#include <bits/stdc++.h>
using namespace std;
const int mod = 100000;
const long long inf = 0x3f3f3f3f;
const double pi = acos(-1);
const int N = 100005;
const int M = 130;
long long a[15][30];
int n, m;
int main() {
  int ans = 0;
  scanf("%d%d", &n, &m);
  memset(a, 0, sizeof(a));
  a[1][11] = m * 2048ll;
  if (m) ans = 1;
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j <= 22; j++) {
      if (a[i - 1][j - 1] > 2048) a[i][j] += (a[i - 1][j - 1] - 2048) / 2;
      if (a[i - 1][j + 1] > 2048) a[i][j] += (a[i - 1][j + 1] - 2048) / 2;
      if (a[i][j] >= 2048) ans++;
    }
  }
  printf("%d\n", ans);
  return 0;
}
