#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int x, y, z;
  cin >> x >> y >> z;
  int p, q, a, b;
  p = max(x, y);
  q = max(p, z);
  a = min(x, y);
  b = min(a, z);
  cout << q - b;
}
