#pragma GCC optimize(2)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
//c(n,k)*c(m,k)*k!
inline int read()
{
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
const int maxn=1e6+100;
char a[maxn];
const int mod=1e9+7;
int main() {
int t;
cin>>t;
int sum=0;
while(t--){
scanf("%s",a);
int len=strlen(a);
int ans=0;
for(int i=0;i<len;i++){
ans=ans*10+(a[i]-'0');
ans%=2;
}
sum=(sum+ans)%2;
}
cout<<sum<<endl;
}