#include #include #include #include #include #include #include using namespace std; #define ll long long #define N 10005 #define mem(a,t) memset(a,t,sizeof(a)) const double eps=1e-4; const int mod=123456; int a[N]; struct node { int x,id; }b[N]; bool cmp(node a,node b) { return a.x=1&&b[l].id>b[i].id&&t1>b[l].id) { t1=b[l].id; } t+=a[i]; } if(t1!=2*n) sum+=t1+1; } printf("%d\n",sum); } return 0; }