Population — a group of individuals of the same species occupying a bounded area, freely interbreeding, having a common origin and genetic basis, and to some extent isolated from other populations of the same species (definition taken from Wikipedia, not directly related to the problem).
Suppose that robots can produce robots in one year, and robots can produce robots in one year.
Initially, there are robots. What is the maximum possible number of robots after years?
The input contains six integers: A, B, C, D, N, K, where 1 \leq A, B, C, D, N, K \leq 10.
Output a single integer — the maximum possible number of robots after years.
Example 1