#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, mid, p, q, sum;
  while (scanf("%d %d %d", &a, &b, &c) == 3) {
    mid = sum = 0;
    if ((a >= b && b >= c) || (a <= b && b <= c)) {
      mid = b;
      p = a;
      q = c;
    } else if ((a <= b && a >= c) || (a >= b && a <= c)) {
      mid = a;
      p = b;
      q = c;
    } else if ((c >= b && c <= a) || (c <= b && c >= a)) {
      mid = c;
      p = a;
      q = b;
    }
    sum = abs(mid - p);
    sum = sum + (abs(mid - q));
    cout << sum << endl;
  }
  return 0;
}
