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;
const int IINF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
const double DINF = numeric_limits<double>::infinity();
const int MOD = 998244353;
const double EPS = 1e-9;
const double PI = acos(-1.0);
const int DX[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int DY[] = {0, 1, 0, -1, 1, -1, -1, 1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long sqr(long long x) { return x * x; }
long long sqr(int x) { return (long long)x * x; }
double sqr(double x) { return x * x; }
long double sqr(long double x) { return x * x; }
mt19937 mmtw(960172);
long long rnd(long long x, long long y) {
  static uniform_int_distribution<long long> d;
  return d(mmtw) % (y - x + 1) + x;
}
template <typename T>
T& updMin(T& a, T const& b) {
  if (b < a) a = b;
  return a;
}
template <typename T>
T& updMax(T& a, T const& b) {
  if (a < b) a = b;
  return a;
}
int solve1(int n) {
  static int d[2050][2050];
  int ans = 0;
  for (int sum = 1; sum <= n; ++sum) {
    for (int mx = 1; mx <= sum; ++mx) {
      d[sum][mx] = (d[sum - mx][min(mx, sum - mx)] + d[sum][mx - 1]) % MOD;
      if (mx == sum) {
        (++d[sum][mx]) %= MOD;
        (ans += d[sum][mx]) %= MOD;
      }
    }
  }
  return ans;
}
int n, k;
int arr[22];
bool check(int len) {
  int sum = 0;
  static int arr2[2050];
  int pos = 0;
  for (int i = len - 1; i >= 0; --i) {
    for (int j = 0; j < arr[i]; ++j) {
      arr2[pos++] = (len - i);
      if (pos > n) return false;
    }
  }
  for (int i = pos - 1; i >= 0; --i) sum += arr2[i] * (pos - i);
  return sum <= n;
}
set<vector<int>> ans;
vector<int> step(vector<int> const& x) {
  static vector<int> y;
  y.clear();
  for (int i = 0; i < ((int)((x).size()));) {
    int j = i + 1;
    while (j < ((int)((x).size())) && x[j] == x[i]) ++j;
    y.push_back(j - i);
    i = j;
  }
  sort((y).begin(), (y).end());
  return y;
}
void go(int len = 0, int csum = 0, int cur = 1) {
  if (len > 0) {
    vector<int> x(arr, arr + len);
    for (int i = 0; i < k - 2; ++i) x = step(x);
    ans.insert(x);
  }
  arr[len] = cur;
  if (check(len + 1))
    go(len + 1, csum + cur, cur);
  else
    return;
  go(len, csum, cur + 1);
}
int solve3(int _n, int _k) {
  n = _n;
  k = _k;
  ans.clear();
  go();
  return ans.size();
}
int solve2(int n) {
  int ans = 0;
  static int d[2050][2050];
  for (int i = 1; i <= n; ++i) d[0][i] = 1;
  for (int cnt = 1; cnt <= 63; ++cnt) {
    static int nd[2050][2050];
    memset(nd, 0, sizeof(nd));
    for (int sum = 1; sum <= n; ++sum) {
      bool was = 0;
      for (int mn = sum / cnt; mn >= 1; --mn) {
        nd[sum][mn] = ((was ? nd[sum][mn + 1] : 0) + d[sum - cnt * mn][mn]);
        if (nd[sum][mn] >= MOD) nd[sum][mn] -= MOD;
        was = 1;
      }
      (ans += nd[sum][1]) %= MOD;
    }
    memcpy(d, nd, sizeof(d));
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  --k;
  k = min(k, 8);
  if (k == 0) {
    cout << solve1(n) << "\n";
  } else if (k == 1) {
    cout << solve2(n) << "\n";
  } else {
    cout << solve3(n, k) << "\n";
  }
  return 0;
}