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