#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  vector<int> nums(3);
  for (int cont = 0; cont < 3; cont++) {
    cin >> nums[cont];
    for (int reco = cont; reco > 0; reco--) {
      if (nums[reco] < nums[reco - 1]) swap(nums[reco], nums[reco - 1]);
    }
  }
  cout << nums[2] - nums[0];
  return 0;
}
