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();
    int fee = 0;

    if(a >= 13){
      fee = b;
    }else if(a >= 6){
      fee = b / 2;
    }else if(a < 5){
      fee = 0;
    }

    System.out.print(fee);
    }
} 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();
    int fee = 0;

    if(a >= 13){
      fee = b;
    }else if(a >= 6){
      fee = b / 2;
    }else if(a < 5){
      fee = 0;
    }

    System.out.print(fee);
    }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int fee = 0;

    if(a >= 13){
      fee = b;
    }else if(a >= 6){
      fee = b / 2;
    }else if(a < 5){
      fee = 0;
    }

    System.out.print(fee);
    } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int fee = 0;

    if(a >= 13){
      fee = b;
    }else if(a >= 6){
      fee = b / 2;
    }else if(a < 5){
      fee = 0;
    }

    System.out.print(fee);
    } 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 fee = 0; fee 0 if(a >= 13){
      fee = b;
    }else if(a >= 6){
      fee = b / 2;
    }else if(a < 5){
      fee = 0;
    } a >= 13 a 13 {
      fee = b;
    } fee = b fee b if(a >= 6){
      fee = b / 2;
    }else if(a < 5){
      fee = 0;
    } a >= 6 a 6 {
      fee = b / 2;
    } fee = b / 2 fee b / 2 b 2 if(a < 5){
      fee = 0;
    } a < 5 a 5 {
      fee = 0;
    } fee = 0 fee 0 System.out.print(fee) System.out.print System.out System System.out fee 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();
    int fee = 0;

    if(a >= 13){
      fee = b;
    }else if(a >= 6){
      fee = b / 2;
    }else if(a < 5){
      fee = 0;
    }

    System.out.print(fee);
    }
}