/*
 * This problem is similar to the english words problem, however,
 * because it only needs the top and bottom heights, we can create
 * a much easier solution of making it a sorted array and choosing
 * the last and first values.
 */
// get the input and put it an array separated by line, and then sort it
var input = require("fs").readFileSync("/dev/stdin").toString();
input = input.split("\n").sort();

// extract the tallest and shortest from the list
var tallest = input[input.length-1];
var shortest = input[0];

// print out the difference
console.log(tallest-shortest);