#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n, i, j, m = 0;
  cin >> b >> g >> n;
  for (i = b; i >= 0; i--) {
    for (j = 0; j <= g; j++)
      if (n == i + j) m++;
  }
  cout << m;
  return 0;
}
