# python 3.4.3
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# library
# -------------------------------------------------------------



# -------------------------------------------------------------
# main
# -------------------------------------------------------------

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

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

print(ans) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline A,B = map(int,input().split()) A map(int,input().split()) map int input().split() ().split () input split B ans = 0 ans 0 if 13 <= A:
    ans = B
elif 6 <= A <= 12:
    ans = B//2 13 <= A 13 A ans = B ans B elif 6 <= A <= 12:
    ans = B//2 6 <= A <= 12 6 <= A 6 A 12 ans = B//2 ans B//2 B 2 print(ans) print ans A,B = map(int,input().split()) map(int,input().split()) A B = map(int,input().split()) map(int,input().split()) B ans = 0 0 ans ans = B B ans ans = B//2 B//2 ans input = sys.stdin.readline sys.stdin.readline input
# python 3.4.3
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# library
# -------------------------------------------------------------



# -------------------------------------------------------------
# main
# -------------------------------------------------------------

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

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

print(ans)