def solver():
    A, B = [int(n) for n in input().split()]
    if A <=5:
      return 0
    if 6 <= A <= 12:
      return B//2
    if 13 <= A:
      return B

if __name__=='__main__':
  print(solver()) def solver():
    A, B = [int(n) for n in input().split()]
    if A <=5:
      return 0
    if 6 <= A <= 12:
      return B//2
    if 13 <= A:
      return B solver int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n A, B = [int(n) for n in input().split()] A [int(n) for n in input().split()] B if A <=5:
      return 0
     A <=5 A 5 return 0 0 if 6 <= A <= 12:
      return B//2
     6 <= A <= 12 6 <= A 6 A 12 return B//2 B//2 B 2 if 13 <= A:
      return B 13 <= A 13 A return B B if __name__=='__main__':
  print(solver()) __name__=='__main__' __name__ '__main__' print(solver()) print solver() solver def solver():
    A, B = [int(n) for n in input().split()]
    if A <=5:
      return 0
    if 6 <= A <= 12:
      return B//2
    if 13 <= A:
      return B def solver():
    A, B = [int(n) for n in input().split()]
    if A <=5:
      return 0
    if 6 <= A <= 12:
      return B//2
    if 13 <= A:
      return B solver
def solver():
    A, B = [int(n) for n in input().split()]
    if A <=5:
      return 0
    if 6 <= A <= 12:
      return B//2
    if 13 <= A:
      return B

if __name__=='__main__':
  print(solver())
