# -*- coding: utf-8 -*-

def main():

    A, B = map(int, input().split())

    if A >= 13:
        ans = B

    elif 6 <= A <= 12:
        ans = B / 2

    elif A <= 5:
        ans = 0

    print(int(ans))


if __name__ == "__main__":
    main() def main():

    A, B = map(int, input().split())

    if A >= 13:
        ans = B

    elif 6 <= A <= 12:
        ans = B / 2

    elif A <= 5:
        ans = 0

    print(int(ans)) main 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 <= 12:
        ans = B / 2

    elif A <= 5:
        ans = 0

     A >= 13 A 13 ans = B ans B elif 6 <= A <= 12:
        ans = B / 2

     6 <= A <= 12 6 <= A 6 A 12 ans = B / 2 ans B / 2 B 2 elif A <= 5:
        ans = 0

     A <= 5 A 5 ans = 0 ans 0 print(int(ans)) print int(ans) int ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():

    A, B = map(int, input().split())

    if A >= 13:
        ans = B

    elif 6 <= A <= 12:
        ans = B / 2

    elif A <= 5:
        ans = 0

    print(int(ans)) def main():

    A, B = map(int, input().split())

    if A >= 13:
        ans = B

    elif 6 <= A <= 12:
        ans = B / 2

    elif A <= 5:
        ans = 0

    print(int(ans)) main
# -*- coding: utf-8 -*-

def main():

    A, B = map(int, input().split())

    if A >= 13:
        ans = B

    elif 6 <= A <= 12:
        ans = B / 2

    elif A <= 5:
        ans = 0

    print(int(ans))


if __name__ == "__main__":
    main()