function Main(input) {
	tmp = input.split(" ");
	var n = parseInt(tmp[0]);
	var k = parseInt(tmp[1]);
	var a = 0;
	var b = 1;
	var r = 0;
	while(a==0){
		if(b+(k-1) <= n){
			r++;
			b++;
		}else{
			a = 1;
		}
	}
	console.log(r);
}

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