#include <bits/stdc++.h>
using namespace std;
int fun(int y, int z, int w) { return min(y, min(z, w)); }
int main() {
  int x[3], a, b, c;
  for (int i = 0; i < 3; i++) cin >> x[i];
  a = abs(x[0] - x[1]) + abs(x[0] - x[2]);
  b = abs(x[1] - x[0]) + abs(x[1] - x[2]);
  c = abs(x[2] - x[0]) + abs(x[2] - x[1]);
  cout << fun(a, b, c);
}
