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