import java.util.*;

class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = "";
    if (a >= 13) s = Integer.toString(b);
    else if (6 <= a && a <= 12) s = Integer.toString(b/2);
    else s = "0";
    System.out.println(s);
  }
} import java.util.*; util.* java class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = "";
    if (a >= 13) s = Integer.toString(b);
    else if (6 <= a && a <= 12) s = Integer.toString(b/2);
    else s = "0";
    System.out.println(s);
  }
} Main public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = "";
    if (a >= 13) s = Integer.toString(b);
    else if (6 <= a && a <= 12) s = Integer.toString(b/2);
    else s = "0";
    System.out.println(s);
  } main {
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = "";
    if (a >= 13) s = Integer.toString(b);
    else if (6 <= a && a <= 12) s = Integer.toString(b/2);
    else s = "0";
    System.out.println(s);
  } 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 String s = ""; s "" if (a >= 13) s = Integer.toString(b);
    else if (6 <= a && a <= 12) s = Integer.toString(b/2);
    else s = "0"; a >= 13 a 13 s = Integer.toString(b) s Integer.toString(b) Integer.toString Integer b if (6 <= a && a <= 12) s = Integer.toString(b/2);
    else s = "0"; 6 <= a && a <= 12 6 <= a 6 a a <= 12 a 12 s = Integer.toString(b/2) s Integer.toString(b/2) Integer.toString Integer b/2 b 2 s = "0" s "0" System.out.println(s) System.out.println System.out System System.out s String args[] args
import java.util.*;

class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();
    String s = "";
    if (a >= 13) s = Integer.toString(b);
    else if (6 <= a && a <= 12) s = Integer.toString(b/2);
    else s = "0";
    System.out.println(s);
  }
}
