#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, cnt = 0;
  cin >> a >> b >> c;
  for (int i = a; i <= c; i += a) {
    if (i % b == 0) {
      cnt++;
    }
  }
  printf("%d", cnt);
  return 0;
}
