#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  int mn = 0;
  cin >> a >> b >> c;
  int d = abs(b - a) + abs(c - a);
  int e = abs(a - b) + abs(c - b);
  mn = min(d, e);
  int f = abs(a - c) + abs(b - c);
  mn = min(mn, f);
  cout << mn << endl;
  return 0;
}
