{"raw_statement":[{"iden":"problem statement","content":"Takahashi had his $N$\\-th birthday, when he was $T$ centimeters tall.  \nAdditionally, we know the following facts:\n\n*   In each year between Takahashi's birth ($0$\\-th birthday) and his $X$\\-th birthday, his height increased by $D$ centimeters. More formally, for each $i = 1, 2, \\ldots, X$, his height increased by $D$ centimeters between his $(i-1)$\\-th birthday and his $i$\\-th birthday.\n*   Between Takahashi's $X$\\-th birthday and his $N$\\-th birthday, his height did not change.\n\nFind Takahashi's height on his $M$\\-th birthday, in centimeters."},{"iden":"constraints","content":"*   $0 \\leq M \\lt N \\leq 100$\n*   $1 \\leq X \\leq N$\n*   $1 \\leq T \\leq 200$\n*   $1 \\leq D \\leq 100$\n*   Takahashi was at least $1$ centimeter tall at his birth.\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $M$ $X$ $T$ $D$"},{"iden":"sample input 1","content":"38 20 17 168 3"},{"iden":"sample output 1","content":"168\n\nIn this sample, Takahashi was $168$ centimeters tall on his $38$\\-th birthday. Also, his height did not change between his $17$\\-th birthday and $38$\\-th birthday.  \nFrom these facts, we find that he was $168$ centimeters tall on his $20$\\-th birthday, so the answer is $168$."},{"iden":"sample input 2","content":"1 0 1 3 2"},{"iden":"sample output 2","content":"1\n\nIn this sample, Takahashi was $1$ centimeter tall on his $0(=M)$\\-th birthday and $3(=T)$ centimeters tall on his $1(=N)$\\-st birthday."},{"iden":"sample input 3","content":"100 10 100 180 1"},{"iden":"sample output 3","content":"90"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}