Fastmod
#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <ctime>
typedef unsigned long long ull;
typedef __uint128_t L;
struct FastMod {
ull b, m;
FastMod() {}
FastMod(ull b) : b(b), m(ull((L(1) << 64) / b)) {}
ull getmod(ull a) {
ull q = (ull)((L(m) * a) >> 64);
ull r = a - q * b;
return r >= b ? r - b : r;
}
} Mod;
#define getmod Mod.getmod
int n;
signed main(void) {
std::cin >> n;
Mod = FastMod(114514);
std::cout << getmod(n) << std::endl;
}