#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c> a >> b; if(a==b){ std::cout << 0 << '\n'; return 0; } if(a>b){ ll ans = 2000000000 - b - 1; std::cout << ans << '\n'; }else{ ll ans = b - 1 - 1; std::cout << ans << '\n'; } return 0; }