#include <iostream>
#include <cstdlib>
#include <ctime>

int main() {
    srand(time(nullptr));
    int n;
    int k;
    std::cin >> n >> k;
    if (n == 3) {
        std::cout << 3 << std::endl;
        return 0;
    }
    int64_t i = (int64_t) rand() * (100000.0 / RAND_MAX) * k;
    if (rand() % 2) {
        i = -i;
    }
    std::cout << i << std::endl;
    return 0;
}