EasyRating 900
Counting Damaged Dragons
A princess counts dragons 1 to d. Every k-th is punched, every l-th is hit, every m-th is kicked and every n-th is burned. How many dragons were harmed?
Input
Five integers k, l, m, n, d (1 ≤ k, l, m, n ≤ 10, 1 ≤ d ≤ 10⁵).
Output
One integer.
Sample 1
Input
1 2 3 4 12
Output
12
Sample 2
Input
2 3 4 5 24
Output
17
Output appears here