def mapt(fn, *args):
    return list(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b = Input()
    if a >= 13:
        print(b)
    elif 6 <= a <= 12:
        print(b//2)
    else:
        print(0)

main() def mapt(fn, *args):
    return list(map(fn, *args)) mapt return list(map(fn, *args)) list(map(fn, *args)) list map(fn, *args) map fn *args args fn fn *args def Input():
    return mapt(int, input().split(" ")) Input return mapt(int, input().split(" ")) mapt(int, input().split(" ")) mapt int input().split(" ") ().split () input split " " def main():
    a, b = Input()
    if a >= 13:
        print(b)
    elif 6 <= a <= 12:
        print(b//2)
    else:
        print(0) main a, b = Input() a Input() Input b if a >= 13:
        print(b)
    elif 6 <= a <= 12:
        print(b//2)
    else:
        print(0) a >= 13 a 13 print(b) print b elif 6 <= a <= 12:
        print(b//2)
     6 <= a <= 12 6 <= a 6 a 12 print(b//2) print b//2 b 2 print(0) print 0 main() main def Input():
    return mapt(int, input().split(" ")) def Input():
    return mapt(int, input().split(" ")) Input def main():
    a, b = Input()
    if a >= 13:
        print(b)
    elif 6 <= a <= 12:
        print(b//2)
    else:
        print(0) def main():
    a, b = Input()
    if a >= 13:
        print(b)
    elif 6 <= a <= 12:
        print(b//2)
    else:
        print(0) main def mapt(fn, *args):
    return list(map(fn, *args)) def mapt(fn, *args):
    return list(map(fn, *args)) mapt
def mapt(fn, *args):
    return list(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b = Input()
    if a >= 13:
        print(b)
    elif 6 <= a <= 12:
        print(b//2)
    else:
        print(0)

main()