#include<iostream>
using namespace std;
int main ()
{
    long long a, b, L, br=0, x=1, y=1, x1, y1;
    cin >> a >> b >> L;
    /*br=a+b-1;
    cout << br << endl;
    while (x*a+y*b<=L)
    {
        x1=x;
        y1=y;
        x++;
        if (x*a+y*b==L)
            br=L-2;
        cout << br << ' ';
        if (x*a+y*b<L)
            br=(x*a+y*b)-(x1*a+y1*b)-2;
            cout << br << ' ';
        if (x*a+y*b>L)
            br+=L-br-1;
                        cout << br << ' ';

        if (x*a+y*b<L)
        {
            x=x1;
            y++;
            if (x*a+y*b<L)
                br=(x*a+y*b)-(x1*a+y1*b)-2;
            else if (x*a+y*b==L)
                br=L-2;
            else
                br=L-1;
        }
        if (x*a+y*b<L)
        {
            x++;
            if (x*a+y*b<L)
                br=(x*a+y*b)-(x1*a+y1*b)-2;
            else if (x*a+y*b==L)
                br=L-2;
            else
                br=L-1;
        }
    }*/
    cout << "2" << endl;
    return 0;
}