def resolve():
    A, B = map(int, input().split())
    print(B if A>=13 else B//2 if 6<=A<=12 else "0")
resolve() def resolve():
    A, B = map(int, input().split())
    print(B if A>=13 else B//2 if 6<=A<=12 else "0") resolve A, B = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split B print(B if A>=13 else B//2 if 6<=A<=12 else "0") print B if A>=13 else B//2 if 6<=A<=12 else "0" A>=13 A 13 B B//2 if 6<=A<=12 else "0" 6<=A<=12 6<=A 6 A 12 B//2 B 2 "0" resolve() resolve def resolve():
    A, B = map(int, input().split())
    print(B if A>=13 else B//2 if 6<=A<=12 else "0") def resolve():
    A, B = map(int, input().split())
    print(B if A>=13 else B//2 if 6<=A<=12 else "0") resolve
def resolve():
    A, B = map(int, input().split())
    print(B if A>=13 else B//2 if 6<=A<=12 else "0")
resolve()