process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line) => {
    lines.push(line);
});
reader.on('close', () => {
    const arr = lines[0].split(' ');
    const max = Math.max(...arr);
    const min = Math.min(...arr);
    
    let result = Math.abs(max - min);
    console.log(result);
});