from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import sys
sys.setrecursionlimit(10**6)

#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(int,input().split()))

a,b=input_list()
ans=0
if a>12:
    ans=b
if 13>a and a>5:
    ans=b//2

print(ans) from collections import Counter from collections import defaultdict from collections import deque import math math import itertools itertools import heapq heapq import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 input_list = lambda : list(map(int,input().split())) input_list lambda : list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a,b=input_list() a input_list() input_list b ans=0 ans 0 if a>12:
    ans=b a>12 a 12 ans=b ans b if 13>a and a>5:
    ans=b//2 13>a and a>5 13>a 13 a a>5 a 5 ans=b//2 ans b//2 b 2 print(ans) print ans a,b=input_list() input_list() a ans=b b ans ans=0 0 ans b=input_list() input_list() b ans=b//2 b//2 ans input_list = lambda : list(map(int,input().split())) lambda : list(map(int,input().split())) input_list
from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import sys
sys.setrecursionlimit(10**6)

#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(int,input().split()))

a,b=input_list()
ans=0
if a>12:
    ans=b
if 13>a and a>5:
    ans=b//2

print(ans)