#include <stdio.h>
#include <stdint.h>
uint16_t spread_bits(uint8_t val) {
uint16_t result = 0;
for (int i = 0; i < 8; i++) {
// Check if the i-th bit is set in input
if (val & (1 << i)) {
// Set the bit at position (i*2) in result
result |= (1 << (i * 2));
}
}
return result;
}
int main() {
uint8_t val;
scanf("%hhu", &val);
uint16_t result = spread_bits(val);
printf("%u", result);
return 0;
}