import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    A, B = map(int, input().split())

    if A >= 13:
        ans = B
    elif 6 <= A and A <= 12:
        ans = B // 2
    else:
        ans = 0
    print(ans)


if __name__ == '__main__':
    solve() import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def solve():
    A, B = map(int, input().split())

    if A >= 13:
        ans = B
    elif 6 <= A and A <= 12:
        ans = B // 2
    else:
        ans = 0
    print(ans) solve A, B = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split B if A >= 13:
        ans = B
    elif 6 <= A and A <= 12:
        ans = B // 2
    else:
        ans = 0
     A >= 13 A 13 ans = B ans B elif 6 <= A and A <= 12:
        ans = B // 2
     6 <= A and A <= 12 6 <= A 6 A A <= 12 A 12 ans = B // 2 ans B // 2 B 2 ans = 0 ans 0 print(ans) print ans if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def solve():
    A, B = map(int, input().split())

    if A >= 13:
        ans = B
    elif 6 <= A and A <= 12:
        ans = B // 2
    else:
        ans = 0
    print(ans) def solve():
    A, B = map(int, input().split())

    if A >= 13:
        ans = B
    elif 6 <= A and A <= 12:
        ans = B // 2
    else:
        ans = 0
    print(ans) solve
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    A, B = map(int, input().split())

    if A >= 13:
        ans = B
    elif 6 <= A and A <= 12:
        ans = B // 2
    else:
        ans = 0
    print(ans)


if __name__ == '__main__':
    solve()
