program zadatak;
var
p,q,r,d,n,st:longint;
x,y,z:real;
begin
read(p,q,r,l,d);
x:=n/r + 0.49;
y:=n/q + 0.49;
z:=n/p + 0.49;
for n:=l to d do begin
IF ( round(x)+(y)+round(z)<=n) then begin
   st:=st+1;
end;
end;
WRITE(st);

end.