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