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