#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, x2, x3;
  cin >> x1 >> x2 >> x3;
  int min, max;
  int t = (x1 < x2) ? x1 : x2;
  min = (t < x3) ? t : x3;
  t = (x1 > x2) ? x1 : x2;
  max = (t > x3) ? t : x3;
  cout << max - min;
}
