#include <bits/stdc++.h>
using namespace std;
int getInt() {
  int x;
  scanf("%d", &x);
  return x;
}
long long getLongLong() {
  long long x;
  scanf("%I64d", &x);
  return x;
}
double getDouble() {
  double x;
  scanf("%lf", &x);
  return x;
}
char getChar() {
  char x;
  scanf("%c", &x);
  return x;
}
template <typename t>
t abs(t a) {
  if (a >= 0) return a;
  return -a;
}
struct dual {
  int a, b;
  bool const operator<(const dual &x) const {
    if (a == x.a) return b > x.b;
    return a < x.a;
  }
};
struct triple {
  int a, b, c;
  bool const operator<(const triple &x) const {
    if (c == x.c) {
      if (a == x.a) return b > x.b;
      return a < x.a;
    }
    return c < x.c;
  }
};
void FastIO() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
vector<int> g[10];
int unit = 0;
int n, t;
void fillB(int lev = 0, int gId = 0, int amn = unit) {
  if (lev >= n) return;
  if (g[lev][gId] < unit) {
    g[lev][gId] += amn;
    return;
  }
  fillB(lev + 1, gId, amn >> 1);
  fillB(lev + 1, gId + 1, amn >> 1);
  return;
}
int main() {
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) g[i].push_back(0);
  }
  unit = 1 << (n - 1);
  while (t--) fillB();
  int ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) {
      if (g[i][j] == unit) ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
