#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int x[3];
  cin >> x[0] >> x[1] >> x[2];
  sort(x, x + 3);
  cout << (x[1] - x[0]) + (x[2] - x[1]) << '\n';
  ;
  return 0;
}
