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