#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, sum = 0, count = 0, m, flag = 0, ans = 0;
  long long int a[3];
  cin >> a[0] >> a[1] >> a[2];
  sort(a, a + 3);
  ans = abs(a[0] - a[1]) + abs(a[1] - a[2]);
  cout << ans;
  return 0;
}
