a,b,c,d,e = map(int,input().split()) u = (a + b) * (c + d) q = 0 for i in range(u + 1): if 0 < i % (a + b) <= a and 0 < i % (c + d) <= c: q += 1 ans = q * (e // u) r = e % u for i in range(r+1): if 0 < i % (a + b) <= a and 0 < i % (c + d) <= c: ans += 1 print(ans)