#include <fstream>

using namespace std;

int main()
{
	ifstream input("CAU1_15.inp");
	ofstream output("CAU1_15.out");

	int count = 0;
	int a, b, c;
	input >> a >> b >> c;
	double temp = (double)c / (double)a;
	for (int i = 1; i < temp; i++)
	{
		if ((c - a * i) % b == 0)
		{
			count++;
		}
	}
	output << count;
	input.close();
	output.close();
	return 0;
}