#include <iostream>
using namespace std;
int main() {
    int A, B;
    cin >> A;
    cin >> B;
    if (A >= 13) {
        cout <<  B << endl;
    }
    else if (A > 6 && A < 12) {
        cout <<  B / 2 << endl;

    }
    else if (A <= 5) {
        cout << " Takahashi is 0 years old, and he can ride the Ferris wheel for free" << endl;
    }
}