Problem: Let's assume that set S consists of m distinct intervals [l1, r1], [l2, r2], ..., [lm, rm] (1 ≤ li ≤ ri ≤ n; li, ri are integers).

Let's assume that f(S) is the maximum number of intervals that you can choose from the set S, such that every two of them do not intersect. We assume that two intervals, [l1, r1] and [l2, r2], intersect if there is an integer x, which meets two inequalities: l1 ≤ x ≤ r1 and l2 ≤ x ≤ r2.

Sereja wonders, how many sets S are there, such that f(S) = k? Count this number modulo 1000000007 (109 + 7).

Input

The first line contains integers n, k (1 ≤ n ≤ 500; 0 ≤ k ≤ 500).

Output

In a single line, print the answer to the problem modulo 1000000007 (109 + 7).

Examples

Input

3 1


Output

23


Input

3 2


Output

32


Input

2 0


Output

1


Input

2 2


Output

2

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename T>
T Abs(T first) {
  return (first < 0 ? -first : first);
}
template <typename T>
T Sqr(T first) {
  return (first * first);
}
string plural(string s) {
  return (int((s).size()) && s[int((s).size()) - 1] == 'x' ? s + "en"
                                                           : s + "s");
}
const int INF = (int)1e9;
const double EPS = 1e-9;
const long double PI = acos(-1.0);
bool Read(int &first) {
  char c, r = 0, n = 0;
  first = 0;
  for (;;) {
    c = getchar();
    if ((c < 0) && (!r)) return (0);
    if ((c == '-') && (!r))
      n = 1;
    else if ((c >= '0') && (c <= '9'))
      first = first * 10 + c - '0', r = 1;
    else if (r)
      break;
  }
  if (n) first = -first;
  return (1);
}
int main() {
  if (0) freopen("in.txt", "r", stdin);
  int N, K;
  int i, j, k, jj, c;
  long long d, p;
  int X, Y;
  static int dyn[2][502][502];
  int pw[502];
  pw[0] = 1;
  for (i = 1; i <= 501; i++) {
    pw[i] = pw[i - 1] << 1;
    if (pw[i] >= 1000000007) pw[i] -= 1000000007;
  }
  Read(N), Read(K);
  X = 0, Y = 1;
  dyn[Y][0][1] = 1;
  for (i = 1; i <= N; i++) {
    swap(X, Y);
    memset(dyn[Y], 0, sizeof(dyn[Y]));
    jj = min(i, K + 1);
    for (j = 0; j < jj; j++)
      for (k = 1; k <= i; k++)
        if (d = dyn[X][j][k]) {
          c = i - k;
          dyn[Y][j][k + 1] = (dyn[Y][j][k + 1] + d * pw[c]) % 1000000007;
          if (j < K) {
            p = (long long)pw[c] * (pw[k] - 1) % 1000000007;
            dyn[Y][j + 1][1] = (dyn[Y][j + 1][1] + d * p) % 1000000007;
          }
        }
  }
  int ans = 0;
  for (k = 1; k <= N + 1; k++) {
    ans += dyn[Y][K][k];
    if (ans >= 1000000007) ans -= 1000000007;
  }
  printf("%d\n", ans);
  return (0);
}