#include using namespace std; using ll = long long; using PII = std::pair; using PLL = std::pair; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) const int mod = 1e9 + 7; ll cal(ll r, ll c, char op) { if (op == '*') return r * c; if (op == '+') return r + c; return 0; } int main() { #ifdef DEBUG cout << "DEBUG MODE" << endl; ifstream in("input.txt"); //for debug cin.rdbuf(in.rdbuf()); //for debug #endif int n, k, ans; if (n < k) ans = -1; else ans = k - 1; cout << ans << endl; return 0; }