Codeforces Round 105 (Div. 2)
A
Insomnia cure
Codeforces
800
原题
←B →
翻译中…

«One dragon. Two dragon. Three dragon», — the princess was counting. She had trouble falling asleep, and she got bored of counting lambs when she was nine.

翻译中…

However, just counting dragons was boring as well, so she entertained herself at best she could. Tonight she imagined that all dragons were here to steal her, and she was fighting them off. Every $*k*$-th dragon got punched in the face with a frying pan. Every $*l*$-th dragon got his tail shut into the balcony door. Every $*m*$-th dragon got his paws trampled with sharp heels. Finally, she threatened every $*n*$-th dragon to call her mom, and he withdrew in panic.

翻译中…

How many imaginary dragons suffered moral or physical damage tonight, if the princess counted a total of $*d*$ dragons?

翻译中…

Input

翻译中…

Input data contains integer numbers $*k*, *l*, *m*, *n*$ and $*d*$, each number in a separate line ($1 ≤ *k*, *l*, *m*, *n* ≤ 10$, $1 ≤ *d* ≤ 10^{5}$).

翻译中…

Output

翻译中…

Output the number of damaged dragons.

翻译中…

Note

翻译中…

In the first case every first dragon got punched with a frying pan. Some of the dragons suffered from other reasons as well, but the pan alone would be enough.

翻译中…

In the second case dragons 1, 7, 11, 13, 17, 19 and 23 escaped unharmed.

翻译中…

样例

Input #1
1
2
3
4
12
Output #1
12
InputCopy OutputCopy
Input #2
2
3
4
5
24
Output #2
17
InputCopy OutputCopy
题目信息
题号
148A
时间限制
2 s
内存限制
256 MB
标签
构造
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。