#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <functional>

using namespace std;

void solve(int test_ind){
	int l, h;
	cin >> l >> h;
	if (l%2) cout << h << endl;
	else cout << (h/2) * 2 << endl;
}

int main(){
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	int t=1;
	//cin >> t;
	for(int i=0;i<t;i++){
		solve(i);
	}
	return 0;
}
