#763. [Wf2015]Amalgamated Artichokes

[Wf2015]Amalgamated Artichokes

Description

有一个数列price_k = p * (sin(a * k + b) + cos(c * k + d) + 2).

求最大的(price_i - price_j) (1 <= i <= j <= n)

Format

Input

多组数据.每组数据六个整数p, a, b, c, d, n.

Output

每组数据输出一行表示答案,保留六位小数.

Samples

392 456 222 152 222 348222
1556.786855

Limitation

1 <= p, a, b, c, d <= 1000, 1 <= n <= 1000000.