#include <bits/stdc++.h>
int main() {
  int x1, x2, x3;
  scanf("%d%d%d", &x1, &x2, &x3);
  int max = (x1 >= x2 && x1 >= x3 ? x1 : (x2 >= x1 && x2 >= x3 ? x2 : x3));
  int min = (x1 <= x2 && x1 <= x3 ? x1 : (x2 <= x1 && x2 <= x3 ? x2 : x3));
  printf("%d\n", max - min);
}
