// No333.cpp : Defines the entry point for the console application. // #include #include #include #include #include #include #include #include #include using namespace std; typedef unsigned char uchar; typedef unsigned int uint; typedef long long ll; typedef unsigned long long ull; #define NMAX 2000000000 int main() { int A, B; cin >> A >> B; int ans = 0; if (A > B) { ans = NMAX - B - 1; } else { ans += B - 2; } cout << ans << endl; return 0; }