//#define _GLIBCXX_DEBUG #include using namespace std; //#include //using namespace atcoder; using ll = long long; #define pp pair #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define ld long double #define al(a) (a).begin(),(a).end() #define mk make_pair #define check cout<<"?"< ostream& operator<<(ostream& os,const vector& v){ if(v.empty()){ os<<"{ }"; return os; } os<<"{"< ostream& operator<<(ostream& os,const pair& P){ os<<"("<>n; vector a(n,0); rep(i,n) cin>>a[i]; if(n==1){ cout<<1< b(n-1,true); rep(i,n-1){ if(a[i]!=a[i+1]) b[i]=false; } int ans=0; rep(i,n-2){ if(!b[i] && !b[i+1]){ ans++; b[i]=b[i+1]=true; } else if(!b[i]){ ans++; b[i]=true; } } if(!b[n-2]) ans++; cout<