Ответ
C++:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int n, a, b;
cin >> n;
cin >> a;
cin >> b;
if (a + b >= n) cout << n — a;
else cout << b + 1;
}
Python:
n = int(input())
a = int(input())
b = int(input())
if a + b >= n:
print(n — a)
else:
print(b + 1)