#include <bits/stdc++.h>
using namespace std;
int main() {
  long x1, x2, x3;
  scanf("%ld%ld%ld", &x1, &x2, &x3);
  long mn = 10000000, p = 0;
  for (int i = 1; i <= 100; i++) {
    p = abs(i - x1) + abs(i - x2) + abs(i - x3);
    mn = min(mn, p);
  }
  printf("%ld\n", mn);
  return 0;
}
