# data[].attributes.body
a1,b1,a2,b2,a3,b3=[int(x) for x in input().split(  )]
A=[(x,y,x*y) for x in range(a1,b1+1) for y in range(a2,b2+1) if x*y in range(a3,b3+1)]
print(len(A))

# data[].attributes.body
def tong(n):
A=[]
s=0
for k in range(1,n-1):
i=k
for t in range(i):
if len(A)<= n-1:
A.append(i)
else: break
for j in range(n):
s=s+A[j]
print(s)
return s
n=int(input("Nhap so n: "))
print("Tong cua ",str(n)," so dau tien la: ",tong(n))

# data[].attributes.body
n=int(input())
B=0
m=n
c=1
d=0
for i in range(1,n):
if m-i>=0:
m=m-i
c=c+1
else :
break
for i in range(1,c):
B=B+(i*i)
B=B+(m*c)
if B<10**9+7:
print(B)
elif B%10**9+7 !=0:
print(B)

# data[].attributes.body
def test(B):
if len(B) == len(set(B)):
return True
i=int(input())
A=[]
for n in range(i):
A.append(int(input()))
for k in A:
K=[]
for x in range(k+1,2*k+10):
if test(list(str(x))) :
K.append(x)
break
print(K[0])