#include<bits/stdc++.h>
using namespace std;
ifstream fi("CAU1_15.inp");
ofstream fo("CAU1_15.out");
int main(){
   ios::sync_with_stdio(false);
   int a,b,c,ans=0;
   fi>>a>>b>>c;
   for(int i=0;i<=c/a;++i){
      int t=(c-i*a)/b;
      if(t*b+i*a==c)ans++;
   }
   fo<<ans;
}
