#include <bits/stdc++.h>
using namespace std;
vector<int> level[12];
vector<double> amount[12];
int cnt;
int n;
void addpani(double totpani) {
  cnt = 0;
  double currpani = totpani;
  amount[1][0] = totpani;
  for (int i = 1; i <= 10; i++) {
    for (int j = 0; j < amount[i].size(); j++) {
      if (amount[i][j] >= 1) {
        amount[i + 1][j] += (amount[i][j] - 1) / 2;
        amount[i + 1][j + 1] += (amount[i][j] - 1) / 2;
        amount[i][j] = 1;
        if (i <= n) cnt++;
      }
    }
  }
}
int main() {
  for (int i = 1; i <= 12; i++) {
    for (int j = 1; j <= i; j++) {
      level[i].push_back(j);
      amount[i].push_back(0);
    }
  }
  int T;
  cin >> n;
  cin >> T;
  addpani(T);
  cout << cnt;
}
