#include <bits/stdc++.h>
using namespace std;
bool arr[200] = {0};
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < a; i++) arr[i] = 1;
  for (int i = 0; i < n - b - 1; i++) arr[i] = 1;
  int ans = 0;
  for (int i = 0; i < n; i++)
    if (arr[i] == 0) ans++;
  cout << ans << endl;
  return 0;
}
