import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def main():
    A, B = map(int, readline().split())
    if A <= 5:
        print(0)
    elif A <= 12:
        print(B//2)
    else:
        print(B)
    
    return


if __name__ == '__main__':
    main() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 def main():
    A, B = map(int, readline().split())
    if A <= 5:
        print(0)
    elif A <= 12:
        print(B//2)
    else:
        print(B)
    
    return main A, B = map(int, readline().split()) A map(int, readline().split()) map int readline().split() ().split () readline split B if A <= 5:
        print(0)
    elif A <= 12:
        print(B//2)
    else:
        print(B)
    
     A <= 5 A 5 print(0) print 0 elif A <= 12:
        print(B//2)
     A <= 12 A 12 print(B//2) print B//2 B 2 print(B) print B return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main readlines = sys.stdin.readlines sys.stdin.readlines readlines INF = 1 << 60 1 << 60 INF def main():
    A, B = map(int, readline().split())
    if A <= 5:
        print(0)
    elif A <= 12:
        print(B//2)
    else:
        print(B)
    
    return def main():
    A, B = map(int, readline().split())
    if A <= 5:
        print(0)
    elif A <= 12:
        print(B//2)
    else:
        print(B)
    
    return main read = sys.stdin.read sys.stdin.read read readline = sys.stdin.readline sys.stdin.readline readline
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def main():
    A, B = map(int, readline().split())
    if A <= 5:
        print(0)
    elif A <= 12:
        print(B//2)
    else:
        print(B)
    
    return


if __name__ == '__main__':
    main()
