#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  int i = a;
  while (i <= b) {
    cin >> a, b, c;
    i += 1;
    int n = 0;
    if (c % i == 0) n += 1;
    cout << n << endl;
  }
  return 0;
}
