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