#include <bits/stdc++.h>
using namespace std;
int factorial(int n) { return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n; }
int main() {
  int n{}, a{}, b{};
  cin >> n >> a >> b;
  n -= a;
  int res = min(b + 1, n);
  cout << res;
  return 0;
}
