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