#include #include using namespace std; using mint=atcoder::modint998244353; long N,X; main() { int T;cin>>T; for(;T--;) { cin>>N>>X; N++; if(X%2==1)cout< O //t,t-2,t-4,... if(N<=t+1) { if(t%2==0)ans+=(N+1)/2; else ans+=N/2; } else { ans+=(t+2)/2; N-=t+1; ans+=(N+1)/2; } } } cout<