import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    A, B = input_nums()
    if A >= 13:
        fee = B
    elif A >= 6:
        fee = B//2
    else:
        fee = 0
    print(fee)

if __name__ == '__main__':
    main() 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 input_nums = lambda: list(map(int, input().split())) input_nums lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def main():
    A, B = input_nums()
    if A >= 13:
        fee = B
    elif A >= 6:
        fee = B//2
    else:
        fee = 0
    print(fee) main A, B = input_nums() A input_nums() input_nums B if A >= 13:
        fee = B
    elif A >= 6:
        fee = B//2
    else:
        fee = 0
     A >= 13 A 13 fee = B fee B elif A >= 6:
        fee = B//2
     A >= 6 A 6 fee = B//2 fee B//2 B 2 fee = 0 fee 0 print(fee) print fee if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    A, B = input_nums()
    if A >= 13:
        fee = B
    elif A >= 6:
        fee = B//2
    else:
        fee = 0
    print(fee) def main():
    A, B = input_nums()
    if A >= 13:
        fee = B
    elif A >= 6:
        fee = B//2
    else:
        fee = 0
    print(fee) main input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input input_nums = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) input_nums
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    A, B = input_nums()
    if A >= 13:
        fee = B
    elif A >= 6:
        fee = B//2
    else:
        fee = 0
    print(fee)

if __name__ == '__main__':
    main()
