#include <bits/stdc++.h>
using namespace std;
long long int a, c, d, e, mini, maxi, m, k, f, i, n, raz, odn, j, b, res;
string s[107][107], s1, s2;
char g;
int main() {
  cin >> n >> a >> b;
  res = n - max(a + 1, n - b) + 1;
  cout << res;
}
