unsigned int z;

z=0;
for(i=count-1;i>=0;i--){
z*=2;
z+=(s[i]-'0');
}
printf("%d\n",z);