#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int main() {
  scanf("%d%d%d", &a, &b, &c);
  int ans = min(min(abs(a - b) + abs(a - c), abs(a - b) + abs(b - c)),
                abs(a - c) + abs(b - c));
  printf("%d\n", ans);
  return 0;
}
