#include <bits/stdc++.h>
using namespace std;
int mat2[2][2] = {{2, 3}, {4, 5}};
int mat[11][11] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                   {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
                   {0, 3, 3, 0, 0, 0, 0, 0, 0, 0},
                   {0, 7, 5, 7, 0, 0, 0, 0, 0, 0},
                   {0, 15, 9, 9, 15, 0, 0, 0, 0, 0},
                   {0, 31, 14, 11, 14, 31, 0, 0, 0, 0},
                   {0, 63, 22, 16, 16, 22, 63, 0, 0, 0},
                   {0, 127, 37, 22, 19, 22, 37, 127, 0, 0},
                   {0, 255, 63, 31, 24, 24, 31, 63, 255, 0},
                   {0, 511, 105, 46, 32, 28, 32, 46, 105, 511, 0},
                   {0, 1023, 182, 69, 41, 34, 34, 41, 69, 182, 1023}};
int main() {
  int a, b, cnt = 0, i, j;
  cin >> a >> b;
  for (i = 1; i <= a; i++)
    for (j = 1; j <= i; j++)
      if (mat[i][j] <= b) cnt++;
  cout << cnt;
  return 0;
}
