http://noi.openjudge.cn/math/7650/
"""
7650 不定方程求解
http://noi.openjudge.cn/math/7650/
"""
a,b,c = map(int,input( ).split( ))
ans=0
x=0
while x<=c//a:
y=0
while y<=c//b:
if (a*x+b*y)==c:
ans+=1
y+=1
x+=1
print(ans)