#include using namespace std; int main(){ int n,k; cin >> n >> k; if(k==0 || k%2==1){ cout << -1 << endl; } else { cout << k+2*(n-k) << endl; for(int i=0;i