divisors = []
divisorsc = []

a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)

for n in range(int(c)):
    if c%(n + 1) == 0:
        divisorsc.append(n+1)
        
for n in range(int(b)):
    if b%(n + 1) == 0 and n + 1 in divisorsc and n + 1 not in divisors:
        divisors.append(n+1)
        
for n in range(int(a)):
    if a%(n + 1) == 0 and n + 1 in divisorsc and n + 1 not in divisors:
        divisors.append(n+1)

print(len(divisors))