A colony of robots exists for such laws:
In one year M robot collect new A robots, and N robot collect new B robots.
Robots are always trying to gather as much new robots.
At the time when the colony was to K robots. How much will the robot through the Т years? (All input values do not exceed 100, the result does not exceed 2000000000).
In one line set of М, А, N, B, K, T through the gap.
Display only the desired number.