#include <bits/stdc++.h>
int main() {
  int b, g, n;
  scanf("%d\n%d\n%d", &b, &g, &n);
  int k = 0, l = 0;
  int c;
  if (n > b) k = n - b;
  if (n > g) l = n - g;
  c = (n + 1) - k - l;
  printf("%d\n", c);
  return 0;
}
