#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  ;
  string s;
  long long m, x = 0, k = 0;
  long long a[3];
  for (long long i = 0; i < 3; i++) {
    cin >> a[i];
  }
  sort(a, a + 3);
  k = a[2] - a[1] + a[1] - a[0];
  cout << k;
}
