Skip to content
UPEEC

Reverse the Bits

Medium#bit-manipulation· solved by 0 · time limit 2.0 s

Treat nn as a 32-bit unsigned number and reverse its bits (bit 0 swaps with bit 31, …). Print the resulting unsigned value.

Input

A single integer nn.

Output

The reversed value.

Constraints

0≤n<2320 \le n < 2^{32} — use an unsigned or 64-bit type.

Sample 1

Input

1

Output

2147483648

Sample 2

Input

43261596

Output

964176192

Sign in or join free to run and submit your solution.