#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,g,x;
   fi>>a>>b>>c;
   g=max(a,b),x=min(a,b);
   for(int i=1;i<=c/g;++i){
      int t=(c-i*g)/x;
      if(t!=0 && t*x+i*g==c)ans++;
   }
   fo<<ans;
}
