import sys
from collections import Counter
from collections import deque
import heapq
import math
import fractions
import bisect
import itertools
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b=mp()
if a>=13:
    print(b)
elif a>=6:
    print(b//2)
else:
    print(0) import sys sys from collections import Counter from collections import deque import heapq heapq import math math import fractions fractions import bisect bisect import itertools itertools def input(): return sys.stdin.readline().strip() input def mp(): return map(int,input().split()) mp def lmp(): return list(map(int,input().split())) lmp a,b=mp() a mp() mp b if a>=13:
    print(b)
elif a>=6:
    print(b//2)
else:
    print(0) a>=13 a 13 print(b) print b elif a>=6:
    print(b//2) a>=6 a 6 print(b//2) print b//2 b 2 print(0) print 0 a,b=mp() mp() a def lmp(): return list(map(int,input().split())) def lmp(): return list(map(int,input().split())) lmp def mp(): return map(int,input().split()) def mp(): return map(int,input().split()) mp b=mp() mp() b def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input
import sys
from collections import Counter
from collections import deque
import heapq
import math
import fractions
import bisect
import itertools
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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