#include <bits/stdc++.h>
using namespace std;
float f[1000 + 10][1000 + 10];
int n, m, ans;
int main() {
  scanf("%d%d", &n, &m);
  f[1][1] = m;
  for (int i = 2; i <= n; i++)
    for (int j = 1; j <= i; j++) {
      if (f[i - 1][j - 1] - 1 > 0) f[i][j] += (f[i - 1][j - 1] - 1) / 2.0;
      if (f[i - 1][j] - 1 > 0) f[i][j] += (f[i - 1][j] - 1) / 2.0;
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= i; j++)
      if (f[i][j] >= 1) ans++;
  cout << ans << endl;
  return 0;
}
