#include <bits/stdc++.h>
int main(void) {
  int a, b, c, sum = 0;
  scanf("%d %d %d", &a, &b, &c);
  while (a < b) {
    if ((c / a) == (1.0 * c / a)) sum = 0;
    a++;
  }
  printf("%d\n", sum);
  return (0);
}
