«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 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<sup class="upper-index">5</sup>).
1
2
3
4
12
12
2
3
4
5
24
17
1
1
1
1
100000
100000
10
9
8
7
6
0
8
4
4
3
65437
32718
8
4
1
10
59392
59392
4
1
8
7
44835
44835
6
1
7
2
62982
62982
2
7
4
9
56937
35246
2
9
8
1
75083
75083
8
7
7
6
69038
24656
4
4
2
3
54481
36320
6
4
9
8
72628
28244
9
7
8
10
42357
16540
5
6
4
3
60504
36302
7
2
3
8
21754
15539
1
2
10
4
39901
39901
3
4
7
1
58048
58048
9
10
4
6
52003
21956
5
10
9
3
70149
32736
5
5
5
10
55592
11118
1
5
2
6
49547
49547
3
7
7
7
84046
36019
10
2
1
8
63537
63537
7
2
10
5
81684
53678
7
1
6
8
99831
99831
3
9
3
3
61082
20360
5
5
8
9
79228
29931
1
5
5
6
89535
89535
5
5
2
1
7682
7682
7
4
8
8
25829
9224
3
4
3
3
87079
43539
5
8
4
9
5226
2438
4
9
6
6
1070
415
10
10
10
10
100000
10000
1
1
1
1
1
1
10
10
10
10
1
0
10
10
1
10
10
10
10
10
1
10
100
100
2
2
2
2
1
0
k = int(input())
l = int(input())
m = int(input())
n = int(input())
d = int(input())


lk = [i for i in range(d+1) if i%k == 0 and i!=0]
ll = [i for i in range(d+1) if i%l == 0 and i!=0]
lm = [i for i in range(d+1) if i%m == 0 and i!=0]
ln = [i for i in range(d+1) if i%n == 0 and i!=0]

x = lk + ll + lm + ln

res = len(list(dict.fromkeys(x)))
print(res)
