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