#include <stdio.h>
#include <stdint.h>
uint16_t spread_bits(uint8_t val) {
// Your logic
uint16_t newval=0;
int bv;
for (int i=0;i<=7;i++){
bv =(val & (1<<i))?1:0; //to check the value of each bit
newval |= (bv<<(i*2)); //to append the value for every twice the value of index
}
return newval;
}
int main() {
uint8_t val;
scanf("%hhu", &val);
uint16_t result = spread_bits(val);
printf("%u", result);
return 0;
}