#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1 = 0, x2 = 0, x3 = 0;
  cin >> x1 >> x2 >> x3;
  int ans = abs(x2 - x1) + abs(x3 - x1);
  if (abs(x1 - x2) + abs(x3 - x2) < ans) {
    ans = abs(x1 - x2) + abs(x3 - x2);
  }
  if (abs(x1 - x3) + abs(x2 - x3) < ans) {
    ans = abs(x1 - x3) + abs(x2 - x3);
  }
  cout << ans;
  return 0;
}
