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