#include using namespace std; int main() { vector ans = { 1, 10000600009, 10002200057, 10003800361, 10004600129, 10005200147, 10006200817, 10006800931, 10008601849, 10009202107, }; int n; cin >> n; n--; cout << ans[n] << endl; return 0; }