#include <bits/stdc++.h>
using namespace std;
int main() {
  ifstream fin;
  fin.open("input");
  vector<vector<int> > v;
  while (true) {
    string str;
    getline(fin, str, '\n');
    if (str.empty()) break;
    stringstream ss(str);
    int tmp;
    vector<int> vbuf;
    while (!ss.eof()) {
      ss >> tmp;
      vbuf.push_back(tmp);
    }
    v.push_back(vbuf);
  }
  fin.close();
  int min, max;
  max = *max_element(v[0].begin(), v[0].end());
  min = *min_element(v[0].begin(), v[0].end());
  printf("%d\n", max - min);
}
