using System;
using System.Collections.Generic;
using System.Linq;
class ITP1
{
    static void Main(string[] args)
    {
        //var exStdIn = new System.IO.StreamReader("stdin.txt");
        //System.Console.SetIn(exStdIn);

        Q3_D();

        //int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s)));
    }

    static void Q1()
    {
        int input = int.Parse(Console.ReadLine());

        int h = input / 3600;
        int m = input % 3600 / 60;
        int s = input % 3600 % 60;

        Console.WriteLine(String.Format("{0}:{1}:{2}", h, m, s));
    }

    static void Q2_A()
    {
        int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s)));

        String sign = a[0] - a[1] > 0 ? ">" : a[0] - a[1] == 0 ? "==" : "<";

        Console.WriteLine(String.Format("a {0} b",sign));
    }

    static void Q2_B()
    {
        int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s)));
        String answer = a[2] - a[1] > 0 ? a[1] - a[0] > 0 ? "Yes" : "No" : "No";

        Console.WriteLine(answer);
    }

    static void Q2_C()
    {
        List<int> a = new List<int>(Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s))));
        a.Sort();

        Console.WriteLine(String.Format("{0} {1} {2}",a[0],a[1],a[2])); 
    }

    static void Q2_D()
    {
        int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s)));

        int chk = 0;

        //x-max
        if (a[0] - a[2] - a[4] >= 0) chk++;
        //x-min
        if (a[2] - a[4] >= 0) chk++;
        //y-max
        if (a[1] - a[3] - a[4] >= 0) chk++;
        //y-min
        if (a[3] - a[4] >= 0) chk++;

        String answer = chk == 4 ? "Yes" : "No";
        Console.WriteLine(answer);
        
    }

    static void Q3_A()
    {
        for (int i = 0; i < 1000; i++)
        {
            Console.WriteLine("Hello World");
        }
    }

    static void Q3_B()
    {
        String a = "";
        for (int i = 1; i <= 10000; i++)
        {
            a = Console.ReadLine();
            if (a != null)
            {
                Console.WriteLine("Case {0}: {1}", i, a);
            }
            else
            {
                break;
            }

        }
    }

    static void Q3_C()
    {
        while(true)
        {
            String str = Console.ReadLine();
            if (str == null || str == "0 0") break;
            int[] a = Array.ConvertAll(str.Split(' '), new Converter<String, int>(s => int.Parse(s)));
            
            List<int> tempList = new List<int>(a);
            tempList.Sort();
            Console.WriteLine(String.Format("{0} {1}",tempList[0],tempList[1]));
        }
    }

    static void Q3_D()
    {
        List<int> a = new List<int>(Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s))));
        List<int> divisorList = new List<int>();
        for (int i = 1; i <= a[2]; i++)
        {
            if (a[2] % i == 0)
            {
                divisorList.Add(i);
            }
        }

        List<int> answerList = new List<int>();
        foreach (int divisor in divisorList)
        {
            if (divisor > a[0] && divisor > a[1]) break;

            if (divisor <= a[0] && a[0] % divisor == 0)
            {
                answerList.Add(divisor);
            }

            if (divisor <= a[1] && a[1] % divisor == 0)
            {
                answerList.Add(divisor);
            }
        }

        answerList.Sort();
        int[] answer = answerList.Distinct().ToArray();

        Console.WriteLine(answer.Length);
    }
}