#ABC259A. [ABC259A] Growth Record

[ABC259A] Growth Record

Score : 100100 points

Problem Statement

Takahashi had his NN-th birthday, when he was TT centimeters tall. Additionally, we know the following facts:

  • In each year between Takahashi's birth (00-th birthday) and his XX-th birthday, his height increased by DD centimeters. More formally, for each i=1,2,,Xi = 1, 2, \ldots, X, his height increased by DD centimeters between his (i1)(i-1)-th birthday and his ii-th birthday.
  • Between Takahashi's XX-th birthday and his NN-th birthday, his height did not change.

Find Takahashi's height on his MM-th birthday, in centimeters.

Constraints

  • 0M<N1000 \leq M \lt N \leq 100
  • 1XN1 \leq X \leq N
  • 1T2001 \leq T \leq 200
  • 1D1001 \leq D \leq 100
  • Takahashi was at least 11 centimeter tall at his birth.
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN MM XX TT DD

Output

Print the answer as an integer.

38 20 17 168 3
168

In this sample, Takahashi was 168168 centimeters tall on his 3838-th birthday. Also, his height did not change between his 1717-th birthday and 3838-th birthday. From these facts, we find that he was 168168 centimeters tall on his 2020-th birthday, so the answer is 168168.

1 0 1 3 2
1

In this sample, Takahashi was 11 centimeter tall on his 0(=M)0(=M)-th birthday and 3(=T)3(=T) centimeters tall on his 1(=N)1(=N)-st birthday.

100 10 100 180 1
90