Population of Robots#139

Population of Robots

1 segundo
64 megabytes
Fácil (≈1000)

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?

Entrada

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

Salida

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

Ejemplos

Ejemplo 1

Loading
Loading