#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, x[3], max = 0, min = 0, nothing = 0, m = 0;
  for (i = 0; i < 3; i++) {
    cin >> x[i];
    if (x[i] > max) {
      max = x[i];
    } else if (x[i] < min) {
      min = x[i];
    } else if (x[i] < max && x[i] > min) {
      nothing = x[i];
    }
  }
  sort(x, x + 3);
  max = x[2];
  min = x[0];
  nothing = x[1];
  m = (max - nothing) + (nothing - min);
  cout << m << "\n";
  return 0;
}
