const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void async function () {
let line = await readline()
line = line.split(' ').map(a=>parseInt(a))
let left = line[0]
let right = line[1]
let length = right-left+1
if(left%2===1 && right%2 === 1){
console.log((length-1)/2)
}else if(left%2===0 && right%2===0){
console.log((length+1)/2)
}else{
console.log(length/2)
}
}()
笨笨的方法之分类讨论

京公网安备 11010502036488号