#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c;
  int A, B;
  string C;
  B = c;
  cin >> a >> b >> c;
  for (int i = a; i <= b; i++) {
    B /= i;
    B *= 10;
    C = B;
    if (C.at(C.size() + 1) == 0) {
      A++;
    }
    B = c;
  }
  cout << A << endl;
}
