#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int main() {
  cin >> a >> b >> c;
  int ans = 0x3f3f3f3f;
  for (int i = 1; i <= 100; i++) {
    ans = min(ans, abs(i - a) + abs(i - b) + abs(i - c));
  }
  cout << ans << '\n';
  return 0;
}
