#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, o;
  cin >> m >> n >> o;
  int peak = max(m, n);
  peak = max(peak, o);
  int bottom = min(m, n);
  bottom = min(bottom, o);
  cout << peak - bottom << endl;
}
