import std.stdio;
import std.algorithm;
import std.math;
import std.conv;
import std.string;

auto readNum(T)(){
  return readln.chomp.to!T;
}

auto readNums(T)(){
  return readln.chomp.split.to!(T[]);
}

void main(){
  auto ab = readNums!int;
  if(ab[0] <= 5){
    writeln(0);
  } else if(ab[0] <= 12){
    writeln(ab[1] / 2);
  } else {
    writeln(ab[1]);
  }
}
