#include <bits/stdc++.h>
using namespace std;
int main() {
  int mini = 0, maxi = 0, mid = 0;
  int arr[3];
  for (int i = 0; i < 3; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + 3);
  cout << abs(arr[0] - arr[1]) + abs(arr[2] - arr[1]);
  return 0;
}
