#include <fstream>
#include<iostream>
using namespace std;
int a,b,c;
int x,y;
int dem=0;
int main()
{
	int q;
	ifstream fi("CAU1_15.inp");
	ofstream fo("CAU1_15.out");
	fi>>a>>b>>c;
	fi.close();
	x=int(c/a);
	x--;
	if(b==0)
	{
		dem++;
	}
	for(int i=x;i>0;i--)
	{
		q=c-(i*a);
		float w=q/b;
		int e=int(q/b);
		if(w==e)
		{
			dem++;
		}
	}
	fo<<dem/2;
	fi.close();
	fo.close();
	return 0;
}
