#include <bits/stdc++.h>
int main() {
  int a, b, c, h;
  scanf("%d%d%d", &a, &b, &c);
  if (a > b) {
    h = a;
    a = b;
    b = h;
  }
  if (b > c) {
    h = b;
    b = c;
    c = h;
  }
  if (a > b) {
    h = a;
    a = b;
  }
  printf("%d", (c - a));
}
