#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n;
  scanf("%d%d%d", &b, &g, &n);
  int ans = 0;
  for (int i = 0; i <= b; ++i) {
    if (n - i <= g && n - i >= 0) ans++;
    if (ans == n + 1) break;
  }
  printf("%d\n", ans);
  return 0;
}
