#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long t;
  cin >> n >> t;
  vector<long long> a[n];
  for (int i = 0; i < n; i++) {
    a[i].resize(i + 1);
  }
  a[0][0] = t * (1 << n);
  for (int i = 0; i < n - 1; i++) {
    for (int j = 0; j <= i; j++) {
      if (a[i][j] > (1 << n)) {
        long long ost = a[i][j] - (1 << n);
        a[i + 1][j] += ost / 2;
        a[i + 1][j + 1] += ost / 2;
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) {
      if (a[i][j] >= (1 << n)) ans++;
    }
  }
  cout << ans;
  return 0;
}
