#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n>>k; Int x=(n+1)*n/2; Int y=(n-k+1+n)*k/2; Int z=x-2*y; cout<<((x-z)/2+1)<