#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int main() {
  vector<int> a;
  for (int i = 0; i < 3; i++) {
    int tmp;
    cin >> tmp;
    a.push_back(tmp);
  }
  sort(a.begin(), a.end(), cmp);
  cout << a[0] - a[2];
  return 0;
}
