p,a[62],i;main(s){for(gets(a);~scanf("%d",&p);)for(i=0;p^=p>>i++&1?!a[i]?s*=2,a[i]=p:a[i]:0;);s=!printf("%d",s);}