Takahashi, who is A years old, is riding a Ferris wheel.
It costs B yen (B is an even number) to ride the Ferris wheel if you are 13 years old or older, but children between 6 and 12 years old (inclusive) can ride it for half the cost, and children who are 5 years old or younger are free of charge. (Yen is the currency of Japan.)
Find the cost of the Ferris wheel for Takahashi.

-----Constraints-----
 - 0 ≤ A ≤ 100
 - 2 ≤ B ≤ 1000
 - B is an even number.

-----Input-----
Input is given from Standard Input in the following format:
A B

-----Output-----
Print the cost of the Ferris wheel for Takahashi.

-----Sample Input-----
30 100

-----Sample Output-----
100

Takahashi is 30 years old now, and the cost of the Ferris wheel is 100 yen.

Difficulty: introductory

Starter code:

Solutions:
# ABC127
# A Ferris Wheel
a, b = list(map(int, input().split()))
if a > 12:
    print(b)
    return
elif a < 6:
    print((0))
    return
else:
    print((b // 2))
    return


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

a,b = map(int,input().split())
ans = b
if a<=5:
    ans = 0
elif a<=12:
    ans//=2
print(ans)

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

A,B = list(map(int, input().split()))

ans = 0
if A >= 13:
	ans = B
elif A >= 6:
    ans = int(B / 2)
else:
	ans = 0

print(ans)





A,B=map(int,input().split())

if A>=13:
  print(B)
elif A<=5:
  print(0)
else:
  print(B//2)

a,b = list(map(int,input().split()))

if a <= 5 :
    print((0))
elif 6 <= a <= 12 :
    print((b//2))
else :
    print(b)


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

a, b = list(map(int, input().split()))
if a >= 13:
    print(b)
elif a >= 6:
    print((b//2))
else:
    print((0))


lst = input()
lst = lst.split()


for i in range(len(lst)):
    lst[i]= int(lst[i])

if lst[0] >= 13:
    print(lst[1])

elif lst[0] < 6:
    print(0)

else:
    print(int(lst[1]/2))

details = list(map(int, input().split()))
A = details[0]
B = details[1]
if A >= 13:
    print(B)
elif A >= 6 and A <= 12:
    print((int(B/2)))
else:
    print((0))


a, b = map(int, input().split())
if a > 12:
    print(b)
elif 6 <= a <= 12:
    print(b//2)
elif 0 <= a <= 5:
    print(0)

a, b = map(int, input().split())
if a < 6:
  print(0)
elif a >= 6 and a <= 12:
  print(b // 2)
else:
  print(b)

import sys

A, B = map(int, sys.stdin.readline().split())
if A <= 5:
    print(0)
elif A <= 12:
    print(B // 2)
else:
    print(B)

A, B = map(int,input().split())
if A >= 13:
    print(B)
elif 6 <= A <= 12:
    print(B//2)
elif A <= 5:
    print(0)

a, b = map(int, input().split())
if a >= 13:
  print(b)
elif 6 <= a <= 12:
  print(b // 2)
else:
  print(0)

a, p = map(int, input().split())

if a <= 5:
    print(0)
elif 6 <= a <= 12:
    print(p//2)
elif a >= 13:
    print(p)

a,b = map(int,input().split())
if a<=5:
    print(0)
elif a<=12:
    print(b//2)
else:
    print(b)

A,B=map(int,input().split())
if A >= 13:
  print(B)
elif A >=6:
  print(B//2)
else:
  print(0)

A, B = map(int, input().split())

if A >= 13:
    print(B)
elif A >= 6:
    print(int(B / 2))
else:
    print(0)

a, b = list(map(int, input().split()))
if a >= 13:
    print(b)
elif a <= 5:
    print((0))
else:
    print((b // 2))


def main():
    a, b = list(map(int, input().split()))
    if a >= 13:
        print(b)
    elif a >= 6:
        print((b//2))
    else:
        print((0))

def __starting_point():
    main()

__starting_point()

a, b = map(int, input().split())

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

A,B =list(map(int,input().split()))

if A > 12:
    ans = B
elif A < 6:
    ans = 0
else:
    ans = B//2
print(ans)





A, B = map(int, input().split())

ans = 0
if A >= 13:
    ans = B
elif 12 >= A >= 6:
    ans = B // 2

print(ans)

A, B = map(int, input().split())
if A < 6:
  print(0)
elif A < 13:
  print(B // 2)
else:
  print(B)

A,B = map(int,input().split())

if(A >= 13):
    print(B)
if(A >= 6 and A <= 12):
    print(B // 2)
if(A <= 5):
    print(0)

a,b = map(int, input().split())

yen = 0
if a<= 5:
  yen = 0
elif a<=12:
  yen = b/2
else:
  yen = b
print(int(yen))

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

rStr = input()

A = int(rStr.split(' ')[0])
B = int(rStr.split(' ')[1])

result = 0

if 13 <= A :
    result = B

elif A <= 5 :
    result = 0

else :
    result = int(B / 2)

print(result)

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

A,B = map(int,input().split())
if A >= 13:
    print(B)
elif A >=6:
    print(B//2)
else:
    print(0)

a,b=map(int, input().split())

if a<=5:
    ans=0

elif 6<=a<=12:
    ans=b//2
    
else:
    ans=b
    
print(ans)

a,b = map(int,input().split())
if a <= 5:
  print(0)
elif a <= 12:
  print(b//2)
else:
  print(b)

def LI():
    return list(map(int, input().split()))


A, B = LI()
if A >= 13:
    ans = B
elif A > 5:
    ans = B//2
else:
    ans = 0
print(ans)


a,b=map(int,input().split())
if a>12:
    print(b)
elif 12>=a>5:
    print(b//2)
else:
    print(0)

a,b = map(int,input().split())

if a >= 13:
    print(b)

elif a >= 6 and a <= 12:
    print(b // 2)

elif a <= 5:
    print("0")

a, b = list(map(int, input().split()))
if a >= 13:
    print(b)
elif 6 <= a <= 12:
    print((b // 2))
else:
    print((0))


A, B = map(int, input().split())
if A < 6:
    ans = 0
elif A <= 12:
    ans = int(B / 2)
else:
    ans = B
print(ans)

a,b = map(int,input().split())
ans = 0
if(a>=13):
  ans = b
elif(a>=6):
  ans = b//2
else:
  ans = 0
print(ans)

a, b = map(int, input().split())

if a >= 13:
    print(b)
elif (6 <= a) and (a<=12):
    print(b//2)
else:
    print(0)

A,B=list(map(int, input().split()))
if A<=5:
    print((0))
elif 6<=A<=12:
    print((B//2))
else:
    print(B)


a,b = map(int,input().split())

if a>=13:print(b)
elif a>=6:print(b//2)
else:print(0)

a, b = map(int, input().split())
print(b if a >= 13 else 0 if a <= 5 else b//2)

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 __starting_point():
  print((solver()))

__starting_point()

a, b = list(map(int, input().split()))

m = 0

if a>12:
    m = b
elif a>5:
    m = b//2

print(m)


a = list(map(int,input().split()))

A = a[0]
B = a[1]

if A >= 13:
    print(B)
elif A >=6 and A <=12:
    print((int(B/2)))
else:
    print((0))



a,b=map(int,input().split())


if a>=13:
  print(b)
elif a>=6 and a<=12:
  print(int(b//2))
else:
  print(0)

def main():
    A,B = list(map(int,input().split()))
    if A >= 13:
        return B
    elif 6 <= A <= 12:
        return int(B/2)
    else:
        return 0

print((main()))


a, b = list(map(int, input().split()))
if a >= 13:
    print(b)
elif a >= 6:
    print((b//2))
else:
    print((0))


a,b=map(int,input().split())
if a>=13:
    print(b)
elif 6<=a<=12:
    print(b//2)
else:
    print(0)

a,b=list(map(int ,input().split()))
if(a>=13):
    print(int(b))
elif(a>=6 and a<=12):
    print(int(b/2))
elif(a==5 or a<5):
    print(0)

a,b=map(int,input().split())
if a<=5:
   print(0)
elif a<=12:
   print(b//2)
else:
   print(b)

A, B = map(int, input().split())

if A >= 13:
    print(B)
elif 6 <= A <= 12:
    print(B // 2)
else:
    print(0)

a,b = map(int,input().split())
if a >= 13:
  print(b)
elif a >= 6:
  print(b//2)
else:
  print(0)

A,B = map(int,input().split())
if A<=5:
  print(0)
elif A<=12:
  print(B//2)
else:
  print(B)

a,b=map(int,input().split())

if a<=5:
  print(0)
elif 6<=a<=12:
  print(b//2)
else:
  print(b)

A, B = map(int, input().split())

if A >= 13:
    print(B)

elif A >= 6:
    print(B//2)

else:
    print(0)

A, B = map(int, input().split())
if A <= 5:
    print(0)
elif A <= 12:
    print(B//2)
else:
    print(B)

a,b = map(int,input().split())

if a >= 13:
  print(b)
elif a <= 5:
  print(0)
else:
  print(b//2)

a, b = list(map(int, input().split()))

if a >= 13:
    print(b)
if 6 <= a <= 12:
    print((b // 2))
if a < 6:
    print((0))


a,b=list(map(int,input().split()))
if a>=13:
  print(b)
elif 6<=a<=12:
  print((b//2))
else:
  print((0))


a, b = list(map(int, input().split()))
if a <= 5:
    print((0))
elif a <= 12:
    print((b//2))
else:
    print(b)


a, b = map(int, input().split())

if a >= 13:
    print(b)
elif a >= 6:
    print(b // 2)
else:
    print(0)

a,b = map(int,input().split())
if a >= 13:
  print(b)
elif 6 <= a <= 12:
  print(int(b/2))
else:
  print(0)

A,B=map(int,input().split())

if 13 <= A:
    print(B)
elif A >= 6 and 12 >= A:
    print(B//2)
else:
    print("0")

a, b = list(map(int, input().split()))
if a >= 13:
    print(b)
elif a >= 6:
    print((b // 2))
else:
    print((0))


a,b = map(int,input().split())
if a >= 13:
    print(b)
elif a >= 6:
    print(b // 2)
else:
    print(0)

a,b = map(int, input().split())


if a<=5:
    fee = 0
elif a>=13:
    fee = b
else:
    fee = b//2

print(fee)

A, B = map(int, input().split())

if A >= 13: print(B)
elif 6 <= A <= 12: print(B // 2)
else: print(0)

a, b = map(int,input().split())
if  (a >= 13):
  print(b)
elif (a >= 6):
  print(b//2)
else:
  print(0)

A,B=map(int,input().split())
if A>12:
    print(B)
elif A>5:
    print(B//2)
else:
    print(B*0)

A, B = input().split()
A=int(A)
B=int(B)
if 13 <= A:
  print(B)
elif 5 < A < 13:
  print(B//2)
else:
  print(0)

a,b=map(int,input().split())
if a<=5:
    print(0)
    return
elif 6<=a<=12:
    print(b//2)
    return
else:
    print(b)

A,B=list(map(int,input().split()))
if A>=13:
    print(B)
elif A>=6:
    print((B//2))
else:
    print((0))


a, b = map(int,input().split())

if a >= 13:
    print(b)
elif a >= 6 and a <= 12:
    print(int(b / 2))
else:
    print(0)

A, B = map(int, input().split())

if(A>=13):
  print(B)
elif(6<=A<=12):
  print(int(B/2))
elif(A<=5):
  print("0")

A,B = map(int,input().split())

if A >= 13:
    print(B)
elif A >= 6:
    print(B//2)
else:
    print(0)

a, b = list(map(int, input().split()))

if a >= 13:
  print(b)
elif 6 <= a <= 12:
  print((int(b/2)))
else:
  print((0))


A, B = map(int, input().split())

if A >= 13:
  print(B)
elif A <= 5:
  print(0)
else:
  print(B // 2)

A,B = map(int, input().split())
if A >= 13:
	print(B)
elif A >= 6:
    print(B // 2)
else:
	print(0)

a,b = map(int, input().split())
print(b if a >= 13 else b // 2 if a >= 6 and a <= 12 else 0)

a,p=map(int, input().split())
if a >=13:
  print(p)
elif a<=5:
  print(0)
else:
  print(p//2)

a,b = map(int, input().split())

if a <= 5: print(0)
elif a <= 12: print(b//2)
else: print(b)

A, B = map(int, input().split())

if A <= 5:
	print("0")

elif A >= 13:
	print(B)

else:
	print(int(B/2))

a, b = list(map(int, input().split()))

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


a, b = list(map(int, input().split()))
if a <= 5:
    print((0))
elif a <= 12:
    print((b//2))
else:
    print(b)


A,B = map(int,input().split())
if A <= 5:
  print(0)
elif A <=12:
  print(B//2)
else:
  print(B)

a, b = map(int, input().split())

if 13 <= a:
    print(b)
elif 6 <= a:
    print(b//2)
else:
    print('0')

a,b = map(int,input().split())
if a >= 13:
    print(b)
elif a >= 6:
    print(b//2)
else:
    print(0)

A,B=map(int, input().split())
if A>=13:
	print(B)
elif 12>=A and A>=6:
	print(B//2)
else:
	print(0)

A,B = map(int,input().split())
print(B) if A>=13 else print(int(B*0.5)) if 6<=A<=12 else print(0)

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

A,B = map(int,input().split())
if 13 <= A:
    print(B)
elif 6 <= A:
    print(B//2)
else:
    print('0')

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



A,B=list(map(int,input().split()))
if A>=13:
    print(B)
elif A<=5:
    print((0))
else:
    print((B//2))


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

A,B = list(map(int,input().split()))

if A >= 13:
    print(B)

elif 6 <= A <= 12:
    print((B//2))

elif 5 >= A:
    print((0))


A, B = list(map(int, input().split()))

if A >= 13:
    print(B)
elif A > 5:
    print((B//2))
else:
    print((0))


age, fee = map(int, input().split())

if age >= 13:
    print(fee)
elif 6 <= age <= 12:
    print(fee // 2)
else:
    print(0)