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