import sys 
 
A, B = map(int, input().split())
cond_older = (12 < A)
cond_young = (6 <= A) & (12 >= A)
 
ans = (
  B if cond_older else
  B//2 if cond_young else
  0
)
 
print(ans) import sys sys A, B = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split B cond_older = (12 < A) cond_older 12 < A 12 A cond_young = (6 <= A) & (12 >= A) cond_young (6 <= A) & (12 >= A) 6 <= A 6 A 12 >= A 12 A ans = (
  B if cond_older else
  B//2 if cond_young else
  0
) ans B if cond_older else
  B//2 if cond_young else
  0 cond_older B B//2 if cond_young else
  0 cond_young B//2 B 2 0 print(ans) print ans cond_older = (12 < A) 12 < A cond_older B = map(int, input().split()) map(int, input().split()) B ans = (
  B if cond_older else
  B//2 if cond_young else
  0
) B if cond_older else
  B//2 if cond_young else
  0 ans A, B = map(int, input().split()) map(int, input().split()) A cond_young = (6 <= A) & (12 >= A) (6 <= A) & (12 >= A) cond_young
import sys 
 
A, B = map(int, input().split())
cond_older = (12 < A)
cond_young = (6 <= A) & (12 >= A)
 
ans = (
  B if cond_older else
  B//2 if cond_young else
  0
)
 
print(ans)