#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "math.h" #include "utility" #include "string" #include "map" #include "unordered_map" #include "iomanip" #include "random" using namespace std; const long long int MOD = 1000000007; list Prime(int M) { listP; P.push_back(2); P.push_back(3); for (int i = 5; i <= M; i += 6) { bool flag = true; for (auto j : P) { if (i%j == 0) { flag = false; break; } } if (flag)P.push_back(i); flag = true; for (auto j : P) { if ((i + 2) % j == 0) { flag = false; break; } } if (flag)P.push_back(i + 2); } return P; } long long int power(long long int x, long long int n, long long int M) { long long int tmp = 1; if (n > 0) { tmp = power(x, n / 2, M); if (n % 2 == 0) tmp = (tmp*tmp) % M; else tmp = (((tmp*tmp) % M)*x) % M; } return tmp; } long long int N, M, K, Q, W, H; long long int ans; int main() { ios::sync_with_stdio(false); cin >> N >> M; if (N <= M) { cout << "1\n"; return 0; } if (N % 2) { cout << "-1\n"; return 0; } if (N > M * 2) { cout << "-1\n"; return 0; } cout << "5\n"; return 0; }