#include <iostream>
using namespace std;
int a, b, c;
int y[10000], i = 0;
void cal(int n)
{
	for (int j = 1; j < n; j++)
	{
		if(c < j)
			break;
		int div = c % j;
		if (div == 0)
		{
			bool repeat = false;
			for (int k = 0; k < i; k++)
			{
				if (j == y[k])
				{
					repeat = true;
					break;
				}
			}
			if (!repeat)
				y[i++] = div;
		}
	}
}
int main()
{
	cin >> a >> b >> c;

	cal(sqrt(a));
	cal(sqrt(b));

	cout << i << endl;
	return 0;
}
