#include #include using namespace std; using namespace atcoder; #define INF 1LL<<60 #define MOD 998244353 #define MMOD 1000000007 using mint=modint998244353; using ll=long long; using ull=unsigned long long; using ld=long double; template using vc=vector; template using vv=vc>; using vl=vector; using vvl=vv; using vs=vc; using vvs=vv; using vb=vc; using vvb=vv; using lP=pair; using vlp=vc; template bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;} template bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;} #define YES cout<<"Yes"< digits={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; do{ ans+=digits[n%x]; n/=x; }while(n); reverse(ans.begin(),ans.end()); return ans; }; ld manhattan(ld x,ld y,ld x2,ld y2){ return (abs(x-x2)+abs(y-y2)); }; ll gcd(ll a,ll b){ while(a>=1&&b>=1){ if(a=1) return a; return b; } //nを素因数分解して、pairで(素数,指数)が返される。 vlp pfact(ll n){ vlp a; for(ll i=2;i*i<=n;i++){ if(n%i!=0) continue; ll ex=0; while(n%i==0){ ex++; n/=i; } a.emplace_back(i,ex); } if(n!=1) a.emplace_back(n,1); return a; } //nを素因数分解して、配列で素数が返される。(総積がnになる) vl pfact2(ll n){ vl a; for(ll i=2;i*i<=n;i++){ while(n%i==0){ n/=i; a.push_back(i); } } if(n!=1) a.push_back(n); return a; } //n以下の整数について素数判定をしてnまでの素数が昇順に入ってる配列を返す。 vl eratosthenes(ll n){ vb isprime(n,false); vl p; for(int i=2;in-r) r=n-r; ll res=1; for(ll i=1;i<=r;i++) res=res*(n-i+1)/i; return res; } //計算量はO(y) ll powmod(ll x,ll y){ ll res=1; for(ll i=0;i q; iro[s]=0; q.push(s); while(!q.empty()){ ll v=q.front(); q.pop(); ll nuru=(iro[v] == 0 ? 1 : 0); for(auto &e:G[v]){ if(iro[e] == -1) iro[e]=nuru,q.push(e); if(iro[v] == iro [e]) return false; } } return true; } //a^b%mを求める ll modpow(ll a,ll b,ll m){ ll ans=1; while(b){ if(b%2==1) ans=(ll)(ans)*a%m; a=(ll)(a)*a%m; b/=2; } return ans; } struct BIT{ private: vl bit; ll n; public: BIT(ll size){ n=size; bit.resize(n+1); } void add(ll a,ll w){ for(ll x=a;x0;x-=x&-x) { ret+=bit[x]; } return ret; } }; string hidukeplus(string s) { //日付を一日進める。s=2025/4/25なら返り値は2025/4/26になる。 ll y=stoll(s.substr(0,4)); ll m=stoll(s.substr(5,2)); ll d=stoll(s.substr(8,2)); vl a={31,28,31,30,31,30,31,31,30,31,30,31}; if(y%300==0||(y%100!=0&&y%4==0)) a[1]=29; if(a[m-1]==d) { d=1; if(m==12) { m=1; y++; }else m++; }else d++; string ans=to_string(y)+"/"+(to_string(m).size()==1? "0": "")+to_string(m)+"/"+(to_string(d).size()==1? "0": "")+to_string(d); return ans; } template istream &operator>>(istream &is, vector &v){ for (T &in : v) is>>in; return is; } template ostream &operator<<(ostream &os,const vector &v) { for(ll i=0;i<(ll)v.size();i++){ os< to; }; int main() { ll n; cin>>n; ll now=1; for(ll i=0;i