407089: GYM102697 060 Maximum Number

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

060. Maximum Numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Find the largest possible number that can be stored with N bits. Assume that the number is a signed integer value. Remember that the maximum value possible with a certain number of bits can be calculated with the formula $$$2^{N-1}-1$$$. When solving this problem, keep in mind that if the input is greater than 32, your programming language may not have large enough integers, so you will need to use larger variable types or arbitrary precision arithmetic. Arbitrary-precision arithmetic comes with most programming languages, for example the BigInteger class in Java.

Input

An Integer N ranging from 1 to 64.

Output

An Integer representing the largest possible number within the given bit size.

ExampleInput
32
Output
2147483647
Note

Be careful of floating point precision errors, and be sure that your output does not print output by a power of ten, e.g. 9.77E13.

加入题单

算法标签: