#include <stdio.h>
unsigned long long a[64] = {16996901218524753458ULL, 12135723458845560798ULL, 13993241336684509229ULL, 3778982755968309810ULL, 4830676549975400213ULL, 17843449021172792053ULL, 13918757768218068269ULL, 10774068925502777227ULL,
13184223834657337197ULL, 1404000305642857595ULL, 3383274001644246450ULL, 6766444778430243011ULL, 9494706561630574470ULL, 17250820395618629535ULL, 7688631088216977321ULL, 9264778305662679657ULL,
8628592279928640055ULL, 7766095509499714201ULL, 17353777905573918702ULL, 5756388061347593069ULL, 1689089698262963288ULL, 10415455764751111933ULL, 18119971829131956312ULL, 9032496326627098605ULL,
4187268192512031555ULL, 8538229265519828819ULL, 5092887485929127319ULL, 3524999288561744014ULL, 11922598514049492402ULL, 3344339168825807125ULL, 17314339779503638370ULL, 3843508027377604242ULL,
10790399649841881072ULL, 14041261599792349281ULL, 15598732838845237621ULL, 16776962356438424262ULL, 804621036627114151ULL, 12600894335504675497ULL, 10911816744522384582ULL, 17329858121786625102ULL,
5853969622025221694ULL, 16585287348884160142ULL, 8804322661073239030ULL, 10074346411487928661ULL, 17819906541780581435ULL, 1843003849188800216ULL, 11968897459705406362ULL, 8680676020693400664ULL,
17163670523768039747ULL, 4635905820808993372ULL, 7553944873235281620ULL, 9665164395747134741ULL, 8359909109140036151ULL, 2882800223158983322ULL, 16684313168346568023ULL, 17314934775088718284ULL,
6037342936219393275ULL, 5620695030657467716ULL, 13448633204347248428ULL, 16826653865855854982ULL, 1524770266633715575ULL, 2524953454621989090ULL, 9825341261704181069ULL, 6812417590946617389ULL};
int main(void)
{
int n;
unsigned long long hash = 0;
for(int i = 0; i < 64; i++)
{
scanf("%1d", &n);
if(!(n == 0 || n == 1))
{
printf("The input bitstream must contain only 0 or 1, and its length must be 64\n");
return 1;
}
if(n)
hash ^= a[i];
}
printf("%llu\n", hash);
return 0;
}