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