import sys, math, collections, heapq, itertools

F = sys.stdin

def single_input(): return F.readline().strip("\n")

def line_input(): return F.readline().strip("\n").split()

def gcd(a, b):

    a, b = max(a, b), min(a, b)

    while a % b > 0: a, b = b, a % b

    return b

  

def solve():

    A, B = list(map(int, line_input()))

    if A >= 13: print(B)

    elif A >= 6: print((B//2))

    else: print((0))

    return 0

  

if __name__ == "__main__":

    solve()
import sys



def solve():

    input = sys.stdin.readline

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

    if A <= 5: B = 0

    elif A <= 12: B //= 2

    print(B)



    return 0



if __name__ == "__main__":

    solve()
import sys, math, collections, heapq, itertools

F = sys.stdin


def single_input():
    return F.readline().strip("\n")


def line_input():
    return F.readline().strip("\n").split()


def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0:
        a, b = b, a % b
    return b


def solve():
    A, B = list(map(int, line_input()))
    if A >= 13:
        print(B)
    elif A >= 6:
        print((B // 2))
    else:
        print((0))
    return 0


if __name__ == "__main__":
    solve()

import sys


def solve():
    input = sys.stdin.readline
    A, B = list(map(int, input().split()))
    if A <= 5:
        B = 0
    elif A <= 12:
        B //= 2
    print(B)
    return 0


if __name__ == "__main__":
    solve()

-import sys, math, collections, heapq, itertools - -F = sys.stdin - - -def single_input(): -    return F.readline().strip("\n") - - -def line_input(): -    return F.readline().strip("\n").split() - - -def gcd(a, b): -    a, b = max(a, b), min(a, b) -    while a % b > 0: -        a, b = b, a % b -    return b +import sys -    A, B = list(map(int, line_input())) -    if A >= 13: -        print(B) -    elif A >= 6: -        print((B // 2)) -    else: -        print((0)) +    input = sys.stdin.readline +    A, B = list(map(int, input().split())) +    if A <= 5: +        B = 0 +    elif A <= 12: +        B //= 2 +    print(B)