#include <bits/stdc++.h>
int main() {
  int h, b, c;
  scanf("%d%d%d", &h, &b, &c);
  int a[3] = {h, b, c};
  for (int i = 0; i < 3 - 1; i++) {
    for (int j = 0; j < 3 - i - 1; j++) {
      if (a[j] > a[j + 1]) {
        int t = a[j];
        a[j] = a[j + 1];
        a[j + 1] = t;
      }
    }
  }
  int m = a[1];
  int p = a[1] - a[0];
  int k = a[2] - a[1];
  int y = p + k;
  printf("%d", y);
}
