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