#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int d1 = abs(a - b) + abs(a - c);
  int d2 = abs(b - a) + abs(b - c);
  int d3 = abs(c - a) + abs(c - b);
  cout << min(d1, min(d2, d3));
}
