#include int main(/*int a,char *b[]*/){ long c=0; int d; for(;;){ d=getc(stdin); if(d<0)break; for(e=0;e<8;e++){ c+=d&1; d=d>>1;}; printf("%x\n",c);}