#pragma GCC optimize("Ofast", "unroll-loops") // #define TEST #define _USE_MATH_DEFINES #include using namespace std; #define ll long long int main(void){ vector lis = {1LL, 10000600009LL, 10002200057LL, 10003800361LL, 10004600129LL, 10005200147LL, 10006000171LL, 10006200817LL, 10006800931LL, 10007200207LL, 10007601083LL}; int N; cin >> N; --N; cout << lis[N] << endl; return 0; }