#include <bits/stdc++.h>
using namespace ::std;
int n, t;
double prmd[10][10];
double prmd2[10][10];
int ans;
void l(double v, int i, int j) {
  if (prmd2[i][j] < 1) {
    prmd2[i][j] += v;
    prmd2[i][j] = min(prmd2[i][j], 1.0);
    v = prmd2[i][j] - v;
  } else if (i != n - 1)
    for (int q = 0; q < 2; q++) {
      l(v / 2, i + 1, j + q);
    }
}
int main() {
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      prmd[i][j] = ((j != 0 && j != i) ? 3 : 1) / (1 << i);
    }
  }
  while (t--) {
    l(1, 0, 0);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      ans += prmd2[i][j] == 1.0;
    }
  }
  cout << ans;
}
