#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, f, g;
  while (cin >> a >> b >> c) {
    vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(), v.end());
    g = 1000000;
    for (d = 0; d < v.size(); d++) {
      e = 0;
      for (f = 0; f < v.size(); f++) {
        if (d == f) {
          continue;
        } else {
          e += abs(v[d] - v[f]);
        }
      }
      if (e < g) {
        g = e;
      }
    }
    cout << g << endl;
    v.clear();
  }
  return 0;
}
