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