#include <bits/stdc++.h>
using namespace std;
int abss(int);
int dis(int, int, int);
int main() {
  int x1, x2, x3;
  cin >> x1 >> x2 >> x3;
  int d1 = abss(x2 - x1) + abss(x3 - x1);
  int d2 = abss(x1 - x2) + abss(x3 - x2);
  int d3 = abss(x1 - x3) + abss(x2 - x3);
  int ans = dis(d1, d2, d3);
  cout << ans << endl;
  return 0;
}
int abss(int a) {
  if (a < 0) return -a;
  return a;
}
int dis(int a, int b, int d) {
  int m = a;
  if (b < m) m = b;
  if (d < m) m = d;
  return m;
}
