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