A, B, C, D, E = map(int,input().split()) S = E//((A+B)*(C+D)) T = E%((A+B)*(C+D)) ans = 0 temp = 0 for t in range((A+B)*(C+D)): if t%(A+B) < A and t%(C+D) < C: ans += 1 if t < T: temp += 1 print(ans*S+temp)