#include <stdio.h>
#include <stdint.h>
#define GET_BIT32(r, n) (((r) >> (n)) & UINT32_C(1))
uint32_t extract_even_bits(uint32_t reg) {
uint32_t res = reg & UINT32_C(0x55555555);
res = ( res | (res >> 1) ) & UINT32_C(0x33333333);
res = ( res | (res >> 2) ) & UINT32_C(0x0f0f0f0f);
res = ( res | (res >> 4) ) & UINT32_C(0x00ff00ff);
res = ( res | (res >> 8) ) & UINT32_C(0x0000ffff);
return (uint16_t)res;
}
int main() {
uint32_t reg;
scanf("%u", ®);
printf("%u", extract_even_bits(reg));
return 0;
}