#include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(i, n) for(int i = 0; i < (int)(n); ++i) using namespace std; using lint = int64_t; int main() { vector ans = {1, 10000600009, 10002200057, 10003800361, 10004600129, 10005200147, 10006000171, 10006200817, 10006800931, 10007200207}; int N; cin >> N; --N; cout << ans[N] << "\n"; return 0; }