function main(input) {
  input = input.split("\n");
var N = parseInt(input[0], 10),
var D = parseInt(input[1], 10),
  if( N/D < N- D*2){
    console.log(Math.floor(N/D))
  }else{
    console.log(Math.floor(N/D)+1)
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));