#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const char nl = '\n';
const double pi = 2 * acos(0.0);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, a, b;
  cin >> n >> a >> b;
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (i > a && (n - i) <= b) ans++;
  cout << ans;
  return 0;
}
