A,B,C,D,E = map(int,input().split()) time,count = 1,1 while time < min((A+B)*(C+D),E): if 0 <= time%(A+B) < A and 0 <= time%(C+D) < C: count += 1 time += 1 print(count*(E//time))