#include <stdio.h>

int main(void) {

  char buffer[256];
  int nb;

  while(1) {
    memset(buffer, 0, sizeof(buffer));

    fgets(buffer, sizeof(buffer), stdin);

    /*
    if(buffer[0] == EOF)
      break;
    */

    nb = atoi(buffer);

    printf("0x%x\n", nb);
    fflush(stdout);
  }

  return 0;
}
