#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
int dir_r[] = {0, 0, -1, 1};
int dir_c[] = {1, -1, 0, 0};
const int oo = 0x3f3f3f3f;
bool vis[1000];
int arr[100];
int main(void) {
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  printf("%d", n - max(a + 1, n - b) + 1);
  return 0;
}
