#include<bits/stdc++.h>
using namespace std;
ifstream fi("BAI2_17.inp");
ofstream fo("BAI2_17.out");
int main(){
   int a,b,c,ans=0;
   fi>>a>>b>>c;
   ans=ans+c/a+c/b;
   int t=a*b;
   while(t<=c){ans--;t+=a*b;}
   fo<<ans;
}
