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