#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, z;
  cin >> x >> y >> z;
  int mx = max(x, max(y, z)), mn = min(x, min(y, z));
  int c;
  if (!(x == mx || x == mn)) {
    c = x;
  } else if (!(y == mx || y == mn)) {
    c = y;
  } else {
    c = z;
  }
  cout << (mx - c) + (c - mn) << endl;
  return 0;
}
