import java.util.*;

class Main {
  public static final int MOD = 1000000007;
  public static final int INF = 1000000000;
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int ans;
    if(A >= 13) ans = B;
    else if(A >= 6 && A <= 12) ans = B / 2;
    else ans = 0;
    System.out.println(ans);
  }

  public static int gcd(int a, int b){
    if(b == 0) return a;
    return gcd(b, a%b);
  }
} import java.util.*; util.* java class Main {
  public static final int MOD = 1000000007;
  public static final int INF = 1000000000;
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int ans;
    if(A >= 13) ans = B;
    else if(A >= 6 && A <= 12) ans = B / 2;
    else ans = 0;
    System.out.println(ans);
  }

  public static int gcd(int a, int b){
    if(b == 0) return a;
    return gcd(b, a%b);
  }
} Main public static final int MOD = 1000000007; MOD 1000000007 public static final int INF = 1000000000; INF 1000000000 public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int ans;
    if(A >= 13) ans = B;
    else if(A >= 6 && A <= 12) ans = B / 2;
    else ans = 0;
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int ans;
    if(A >= 13) ans = B;
    else if(A >= 6 && A <= 12) ans = B / 2;
    else ans = 0;
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int ans; ans if(A >= 13) ans = B;
    else if(A >= 6 && A <= 12) ans = B / 2;
    else ans = 0; A >= 13 A 13 ans = B ans B if(A >= 6 && A <= 12) ans = B / 2;
    else ans = 0; A >= 6 && A <= 12 A >= 6 A 6 A <= 12 A 12 ans = B / 2 ans B / 2 B 2 ans = 0 ans 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static int gcd(int a, int b){
    if(b == 0) return a;
    return gcd(b, a%b);
  } gcd {
    if(b == 0) return a;
    return gcd(b, a%b);
  } if(b == 0) return a; b == 0 b 0 return a; a return gcd(b, a%b); gcd(b, a%b) gcd b a%b a b int a a int b b
import java.util.*;

class Main {
  public static final int MOD = 1000000007;
  public static final int INF = 1000000000;
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int ans;
    if(A >= 13) ans = B;
    else if(A >= 6 && A <= 12) ans = B / 2;
    else ans = 0;
    System.out.println(ans);
  }

  public static int gcd(int a, int b){
    if(b == 0) return a;
    return gcd(b, a%b);
  }
}