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