#K37242. Maximizing Weapon Effectiveness
Maximizing Weapon Effectiveness
Maximizing Weapon Effectiveness
You are given two integers, E and S, representing the initial effectiveness of a weapon and the number of enhancement steps available, respectively. In each enhancement step the effectiveness of the weapon is doubled.
The final effectiveness of the weapon will be calculated by the formula: \(E \cdot 2^{S}\). You are to compute and output the maximum possible effectiveness after S steps.
Constraints:
- 1 ≤ E ≤ 109
- 1 ≤ S ≤ 30
Example:
Input: 50 4 Output: 800</p>Input: 3 5 Output: 96
inputFormat
The input consists of a single line containing two space-separated integers: E (the initial effectiveness) and S (the number of enhancement steps).
outputFormat
Output a single integer denoting the maximum possible effectiveness of the weapon after S enhancement steps.
## sample50 4
800