def ferris_wheel(a, b):

    return b if 13<=a else int(b/2) if 6<= a<=12 else 0
def main():
    a, b = map(int, input().split())
    print(ferris_wheel(a, b))

if __name__ == '__main__':
    main() def ferris_wheel(a, b):

    return b if 13<=a else int(b/2) if 6<= a<=12 else 0 ferris_wheel return b if 13<=a else int(b/2) if 6<= a<=12 else 0 b if 13<=a else int(b/2) if 6<= a<=12 else 0 13<=a 13 a b int(b/2) if 6<= a<=12 else 0 6<= a<=12 6<= a 6 a 12 int(b/2) int b/2 b 2 0 a a b b def main():
    a, b = map(int, input().split())
    print(ferris_wheel(a, b)) main a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b print(ferris_wheel(a, b)) print ferris_wheel(a, b) ferris_wheel a b if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def ferris_wheel(a, b):

    return b if 13<=a else int(b/2) if 6<= a<=12 else 0 def ferris_wheel(a, b):

    return b if 13<=a else int(b/2) if 6<= a<=12 else 0 ferris_wheel def main():
    a, b = map(int, input().split())
    print(ferris_wheel(a, b)) def main():
    a, b = map(int, input().split())
    print(ferris_wheel(a, b)) main
def ferris_wheel(a, b):

    return b if 13<=a else int(b/2) if 6<= a<=12 else 0
def main():
    a, b = map(int, input().split())
    print(ferris_wheel(a, b))

if __name__ == '__main__':
    main()