#include #include #include #include #include #include #include #include #include #include #include #include #include #include #pragma GCC optimize("O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma comment(linker, "STACK:36777216") using namespace std; using i64 = int64_t; constexpr i64 MOD = 1e9 + 7; mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); using vi = vector; using vvi = vector; using vvvi = vector; using ii = pair; i64 tmp[] = {1,568658242,832989125,964713680,432717573,865999464,735084983,588059454,834230221,314653273,421935805,244213913,499865885,806688401,709661070,3368271,207231765,170842191,827693172,146063335,960280099,966692748,461319921,315013999,315391517,588888893,51320231,320055902,684924180,384456174,797022895,14153804,367300832,48054659,484574239,560466957,4644675,389023,788082206,455179231,198885522,840681663,758718052,41061196,350742828,601928613,408922199,148427570,302573877,376573500,144300001,478837572,431568836,185203966,327504435,430091869,417874738,421521591,682840839,622404319,296328424,970884251,734888505,903100813,478433713,91690004,254048209,881130177,473847831,849538152,104286961,902479973,955740468,856586321,945512322,588744593,241410053,993457327,583703689,650561389,712458802,979471021,958467374,422206051,62266485,77592561,337918007,660154005,703985793,404410458,17797199,332634843,756007764,278415043,181039352,868784608,583986413,368933151,348032305,490943380,24430014}; i64 get(i64 n) { i64 rem = tmp[n / i64(1e7)]; for (int i = n / i64(1e7) * i64(1e7); i < n; i++) { rem *= 100; rem += 1; rem %= MOD; } return rem; } vector ans2 = {"0", "1"}; int main() { i64 n; cin >> n; i64 m = n; n = (n - 1) % (MOD - 1); cout << get(n) << endl; for (int i = 0; i < 12; i++) { ans2.push_back(ans2.back() + "01"); } cout << ans2[m % 11] << endl; }