#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, x2, x3;
  cin >> x1 >> x2 >> x3;
  int noMax, noMin;
  noMax = fmax(x1, fmax(x2, x3));
  noMin = fmin(x1, fmin(x2, x3));
  cout << noMax - noMin << endl;
  return 0;
}
