#include using namespace std; int main(){ int n,m; if(n<=m)printf("1\n"); else { if(n%2==0&&n>=n/2)printf("2\n"); else printf("-1\n"); } }