intqpow(int a, int x) { int res = 1; while (x) { if (x & 1) res = 1ll * res * a % mod; a = 1ll * a * a % mod; x >>= 1; } return res; } intmain() { int x = 0; char c = getchar(); while (c < '0' || c > '9') {
c = getchar(); } while (c >= '0' && c <= '9') x = (1ll * x * 10 % (mod - 1) + c - '0') % (mod - 1), c = getchar(); cout << 1ll * (qpow(e2 + 1, x) - qpow(mod - e2 + 1, x) + mod) % mod * qpow(4, mod - 2) % mod * e2 % mod << endl; }