#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int a, b, n;
  cin >> n >> a >> b;
  if (a >= 0 && b >= 0 && a < n && b < n && n <= 100) {
    int frontA = n - (a + 1) + 1;
    int behindB = n - (n - b) + 1;
    cout << ((frontA >= behindB) ? behindB : frontA) << endl;
  }
  return 0;
}
