#include "bits/stdc++.h" #include "atcoder/all" using namespace std;using namespace atcoder; using lint=long long;using ll=lint; lint mod=998244353; lint inf64=1LL<<61;int inf32=1<<30; //define endl "\n" #define repp(i, m, n) for (int i = (int)m; i < (int)(n); i++) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define vec vector #define al(x) x.begin(),x.end() #define pb push_back #define mp make_pair #define fi first #define se second #define str string #define ins insert lint gcd(lint a, lint b){if(a>>p; int h,w,k; void f(vec>&tmp){ p.pb(tmp); repp(i,tmp[tmp.size()-1].se+1,h){ repp(j,i+1,h){ tmp.pb(mp(i,j)); f(tmp); tmp.pop_back(); } } } int main(){ lint n; cin>>n; lint a[n]; lint x=0; rep(i,n){ cin>>a[i]; x^=a[i]; } bool turn; if(x==0){ turn=false; cout<<0<>i>>k>>r; i--; a[i]-=k; x^=k; if(r==0)continue; else return 0; }else{ turn=false; rep(i,n){ if(a[i]>=x){ cout<>r; if(r==-1)return 0; break; } } } } }