#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long int> a(3);
  cin >> a[0] >> a[1] >> a[2];
  sort(a.begin(), a.end());
  cout << abs(a[0] - a[1]) + abs(a[2] - a[1]);
  return 0;
}
