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