Your task is to:
Example-1
Input: 0x01F0
Output: 31
(Binary = 0000 0001 1111 0000 → bits 4–8 are all 1)
Example-2
Input: 0x0000
Output: 0
Example-3
Input: 0x00B0
Output: 11
(Binary = 0000 0000 1011 0000 → bits 4–8 = 01011)
Input
0x01F0
Expected Output
31