#include <bits/stdc++.h>
using namespace std;
int level(int n, int sum[]) {
  int i;
  for (i = 1; i < 11; i++) {
    if (n > sum[i - 1] && n <= sum[i]) {
      return i;
    }
  }
}
int number(int n, int l, int sum[]) {
  int st = sum[l - 1] + 1;
  return n - st + 1;
}
int main() {
  int sum[11] = {0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55};
  int n, t, i, j, k;
  cin >> n >> t;
  int ans = 0;
  vector<int> adj[60];
  for (i = 1; i < 56; i++) {
    int l = level(i, sum);
    int num = number(i, l, sum);
    adj[i].push_back(sum[l] + num);
    adj[i].push_back(sum[l] + num + 1);
  }
  double w[100] = {0};
  double one = 1.00;
  for (j = 1; j <= t; j++) {
    w[1] += one;
    for (i = 1; i < 56; i++) {
      if (w[i] >= one) {
        double rem = (w[i] - one) / 2.00;
        w[i] = one;
        for (k = 0; k < adj[i].size(); k++) {
          w[adj[i][k]] += rem;
        }
      }
    }
  }
  for (i = 1; i <= sum[n]; i++) {
    if (w[i] == one) ans++;
  }
  cout << ans << endl;
  return 0;
}
