#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int INF = numeric_limits<int>::max();
const ll INF_LL = numeric_limits<ll>::max();
void solve() {
  int n, a, b;
  cin >> n >> a >> b;
  int cnt = 0;
  for (int i = a + 1; i <= n; i++) {
    if (n - i <= b) cnt++;
  }
  cout << cnt;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
