#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, dif, flag = 0;
  ;
  scanf("%d %d %d", &a, &b, &c);
  if (b + c < a) {
    flag = 1;
    printf("%d\n", c + 1);
  }
  dif = abs(b - a);
  if (flag == 0) printf("%d\n", dif);
  return 0;
}
