#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, a, b;
  cin >> n >> a >> b;
  long long left = a;
  long long right = n - b - 1;
  long long end = max(left, right);
  long long ans = n - end;
  cout << ans;
}
