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