const Main = (input) => {
  const dataArray = input.split(' ');
  const A = dataArray[0];
  const B = dataArray[1];
  const answer = B % A;
  if(B % A == 0){
  console.log(answer);
  }else{
  console.log(answer + 1);
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));