#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3], Min = 1e9, Max = -1;
  cin >> a[0] >> a[1] >> a[2];
  for (int j = 0; j < 3; j++) {
    for (int i = 0; i < 2; i++) {
      if (a[i] > a[i + 1]) {
        swap(a[i], a[i + 1]);
      }
    }
  }
  cout << (a[1] - a[0]) + (a[2] - a[1]);
}
