#include <bits/stdc++.h>
using namespace std;
long long dp[404][404];
int n;
const int mod = 1000000007;
int main() {
  dp[1][1] = 1;
  dp[1][0] = 1;
  cin >> n;
  for (int i = 2; i <= n + 2; i++) {
    for (int j = 0; j <= n + 2; j++) {
      dp[i][j] = 0;
      for (int k = 0; k <= j + 1; k++) {
        if (k <= j)
          dp[i][j] += dp[i - 1][k] * dp[i - 1][j - k] % mod * (j * 2 + 1) % mod;
        dp[i][j] +=
            dp[i - 1][k] * dp[i - 1][j + 1 - k] % mod * j % mod * (j + 1) % mod;
        if (k <= j - 1) dp[i][j] += dp[i - 1][k] * dp[i - 1][j - 1 - k] % mod;
      }
      if (dp[i][j] >= mod) dp[i][j] %= mod;
    }
  }
  cout << dp[n][1];
}
