Problem: Let's define the function f of multiset a as the multiset of number of occurences of every number, that is present in a.

E.g., f(\{5, 5, 1, 2, 5, 2, 3, 3, 9, 5\}) = \{1, 1, 2, 2, 4\}.

Let's define f^k(a), as applying f to array a k times: f^k(a) = f(f^{k-1}(a)), f^0(a) = a. 

E.g., f^2(\{5, 5, 1, 2, 5, 2, 3, 3, 9, 5\}) = \{1, 2, 2\}.

You are given integers n, k and you are asked how many different values the function f^k(a) can have, where a is arbitrary non-empty array with numbers of size no more than n. Print the answer modulo 998 244 353.

Input

The first and only line of input consists of two integers n, k (1 ≤ n, k ≤ 2020).

Output

Print one number — the number of different values of function f^k(a) on all possible non-empty arrays with no more than n elements modulo 998 244 353.

Examples

Input


3 1


Output


6


Input


5 6


Output


1


Input


10 1


Output


138


Input


10 2


Output


33

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long sqr(long long x) { return x * x; }
int mysqrt(long long x) {
  int l = 0, r = 1e9 + 1;
  while (r - l > 1) {
    int m = (l + r) / 2;
    if (m * (long long)m <= x)
      l = m;
    else
      r = m;
  }
  return l;
}
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
mt19937_64 rndll(
    chrono::high_resolution_clock::now().time_since_epoch().count());
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
int gcdex(int a, int b, int &x, int &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  int x1, y1;
  int ret = gcdex(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return ret;
}
int Mod = 998244353;
int Bpow(int x, long long y) {
  int ret = 1;
  int w = x;
  while (y) {
    if (y & 1) ret = (ret * (long long)w) % Mod;
    w = (w * (long long)w) % Mod;
    y >>= 1;
  }
  return ret;
}
int Bdiv(int x) {
  int a, b;
  gcdex(x, Mod, a, b);
  if (a < 0) a += Mod;
  return a;
}
int Bdiv(int x, int y) { return (x * (long long)Bpow(y, Mod - 2)) % Mod; }
inline int ad(int x, int y) { return x + y >= Mod ? x + y - Mod : x + y; }
inline int dif(int x, int y) { return x - y < 0 ? x - y + Mod : x - y; }
inline int mul(int x, int y) { return (x * (long long)y) % Mod; }
int inv(int a) {
  int b = Mod, x = 0, y = 1;
  while (a) {
    int t = b / a;
    b -= a * t;
    x -= t * y;
    swap(a, b);
    swap(x, y);
  }
  if (x < 0) x += Mod;
  return x;
}
void setmin(int &x, int y) { x = min(x, y); }
void setmax(int &x, int y) { x = max(x, y); }
void setmin(long long &x, long long y) { x = min(x, y); }
void setmax(long long &x, long long y) { x = max(x, y); }
const long long llinf = 1e18 + 100;
const long double eps = 1e-9;
const int maxn = 1e5 + 100, maxw = 1e6 + 100, inf = 2e9 + 100, sq = 100, X = 43,
          LG = 18;
int n;
namespace t2 {
int ans[2021];
int dp[2021][2021];
void calc() {
  for (int i = 0; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (i == 0)
        dp[i][j] = 1;
      else {
        int w = i - j * (j + 1) / 2;
        dp[i][j] = ad(dp[i][j - 1], (w >= 0 ? dp[w][j] : 0));
      }
  for (int i = 1; i <= n; i++) ans[i] = ad(ans[i - 1], dp[i][mysqrt(2 * n)]);
}
};  // namespace t2
namespace t1 {
int ans[2021];
int dp[2021][2021];
void calc() {
  dp[0][0] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= i; j++)
      dp[i][j] = ad(dp[i][j - 1], dp[i - j][min(i - j, j)]);
  for (int i = 1; i <= n; i++) ans[i] = ad(ans[i - 1], dp[i][i]);
}
};  // namespace t1
int a[2020], k;
int ans;
vector<vector<int> > all;
bool can(int sz) {
  if (sz == 0) return 1;
  auto f = [](int w) { return w * (w + 1) / 2; };
  auto F = [&f](int l, int r) { return f(r) - f(l - 1); };
  long long now = 0;
  int last = 0;
  for (int i = sz - 1; i >= 0; i--) {
    now += F(last + 1, last + a[i]) * (long long)(i + 1);
    if (now > n) return 0;
    last += a[i];
  }
  if (k == 0) {
    ans++;
  } else {
    vector<int> g(sz);
    for (int i = 0; i < sz; i++) g[i] = a[sz - 1 - i];
    int k1 = k;
    while (k1--) {
      vector<int> q;
      int l = 0, r = 0;
      while (l < g.size()) {
        while (r < g.size() && g[r] == g[l]) r++;
        q.push_back(r - l);
        l = r;
      }
      sort(q.begin(), q.end());
      swap(g, q);
    }
    all.push_back(g);
  }
  return 1;
}
bool calc(int it, int last) {
  if (!can(it)) return 0;
  for (int i = 1; i <= last; i++) {
    a[it] = i;
    if (!calc(it + 1, i)) break;
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  n = 2020;
  k = 8;
  cin >> n >> k;
  if (k > 9) {
    cout << 1;
    return 0;
  }
  if (k == 2) {
    t2::calc();
    cout << t2::ans[n] << '\n';
    return 0;
  }
  if (k == 1) {
    t1::calc();
    cout << t1::ans[n] << '\n';
    return 0;
  }
  k -= 3;
  calc(0, n);
  if (k == 0) {
    cout << ans;
    return 0;
  }
  sort(all.begin(), all.end());
  all.resize(unique(all.begin(), all.end()) - all.begin());
  cout << all.size() << '\n';
  return 0;
  vector<int> g = {2};
  int s = 0;
  int n = 2020;
  while (1) {
    s++;
    reverse(g.begin(), g.end());
    cout << s << ' ' << g.size() << '\n';
    int o = 0;
    for (int i : g) o += i;
    if (o > n) break;
    vector<int> q;
    for (int i = 0; i < g.size(); i++) {
      for (int j = 0; j < g[i]; j++) q.push_back(i + 1);
    }
    swap(g, q);
  }
}