#include <bits/stdc++.h>
int main() {
  std::vector<long int> x;
  for (int i = 0; i < 3; i++) {
    long int j;
    std::cin >> j;
    x.push_back(j);
  }
  sort(x.begin(), x.end());
  long int min_dist = 0;
  for (int i = 0; i < 3; i++) {
    min_dist += abs(x[i] - x[1]);
  }
  std::cout << min_dist;
  return 0;
}
