Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/bakteriyalar-soni

Number of bacteria

Easy 1000 ms 64 MB 27%
Share

A dish contains $a$ bacteria. Every hour each bacterium splits in two, so the number of bacteria doubles. How many bacteria will be in the dish after $n$ hours?

Bacteria splitting in two every hour: bars doubling hour by hour

Input

One line with two integers: $a$ and $n$.

Output

One integer — the number of bacteria after $n$ hours.

Note

$1 \le a \le 1000$
$0 \le n \le 50$

Examples

Input #1
3 4
Output #1
48
Input #2
1 0
Output #2
1

Sign in to submit a solution

Signing up is free and takes a minute.