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