Population of Robots#139

Population of Robots

1 second
64 megabytes
Easy

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?

Input

The input contains six integers: A, B, C, D, N, K, where 1 \leq A, B, C, D, N, K \leq 10.

Output

Output a single integer — the maximum possible number of robots after years.

Examples

Example 1

Loading
Loading