#include void run(void){ int n,m; scanf("%d%d",&n,&m); if(n<=m){ printf("1\n"); } else if(2*m>=n){ printf("2\n"); } else { printf("-1\n"); } return; } int main(void){ run(); return 0; }