#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int left = min(a, min(b, c));
  int rite = max(a, max(b, c));
  int min = 1e3;
  for (int i = left; i <= rite; i++) {
    if (min > (abs(i - a) + abs(i - b) + abs(i - c)))
      min = abs(i - a) + abs(i - b) + abs(i - c);
  }
  cout << min << "\n";
  return 0;
}
