def main():
    A, B = map(int, input().split())
    if A <= 5:
        print(0)
    elif A > 5 and A <= 12:
        print(B//2)
    else:
        print(B)
    
    
if __name__ == '__main__':
    main() def main():
    A, B = map(int, input().split())
    if A <= 5:
        print(0)
    elif A > 5 and A <= 12:
        print(B//2)
    else:
        print(B)
    
     main A, B = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split B if A <= 5:
        print(0)
    elif A > 5 and A <= 12:
        print(B//2)
    else:
        print(B)
    
     A <= 5 A 5 print(0) print 0 elif A > 5 and A <= 12:
        print(B//2)
     A > 5 and A <= 12 A > 5 A 5 A <= 12 A 12 print(B//2) print B//2 B 2 print(B) print B if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    A, B = map(int, input().split())
    if A <= 5:
        print(0)
    elif A > 5 and A <= 12:
        print(B//2)
    else:
        print(B)
    
     def main():
    A, B = map(int, input().split())
    if A <= 5:
        print(0)
    elif A > 5 and A <= 12:
        print(B//2)
    else:
        print(B)
    
     main
def main():
    A, B = map(int, input().split())
    if A <= 5:
        print(0)
    elif A > 5 and A <= 12:
        print(B//2)
    else:
        print(B)
    
    
if __name__ == '__main__':
    main()