#include <bits/stdc++.h>
using namespace std;
int main() {
  int s[3];
  int n;
  for (n = 0; n <= 2; n++) {
    cin >> s[n];
  }
  sort(s, s + 3);
  int a;
  a = (s[1] - s[0]) + (s[2] - s[1]);
  cout << a << endl;
}
