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