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