#include <iomanip>
#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
#include <set>
#include "queue"
//#include <multiset>
#include <map>
#include <utility>
#include <numeric>
#include "random"
#ifndef __clang__
#include <bits/stdc++.h>
#endif
using namespace std;

#define all(x) (x).begin(), (x).end()
#define int long long


void solve() {
    int l, h;
    cin >> l >> h;
    if (l % 2 == 1)
    {
        cout << h << "\n";
    }
    else {
        cout << 2 * (h / 2) << "\n";
    }

}

signed main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);

    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
}
