#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3], sum = 0;
  cin >> a[0] >> a[1] >> a[2];
  sort(a, a + 3);
  int avg = a[1];
  sum = abs(a[0] - avg) + abs(a[2] - avg);
  cout << sum;
}
