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