#include <stdio.h>
#include <stdint.h>
uint32_t convert_endian(uint32_t value) {
// Write logic to swap bytes
typedef union{
uint32_t myValue;
uint8_t myBytes[4];
}myUnion;
uint8_t myTemp;
myUnion temp;
temp.myValue = value;
myTemp = temp.myBytes[0];
temp.myBytes[0] = temp.myBytes[3];
temp.myBytes[3] = myTemp;
myTemp = temp.myBytes[1];
temp.myBytes[1] = temp.myBytes[2];
temp.myBytes[2] = myTemp;
return temp.myValue;
}
int main() {
uint32_t val;
scanf("%u", &val);
printf("%u", convert_endian(val));
return 0;
}