#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 5;
const long long mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
long long co[maxn];
long long n, m, k, t;
string str;
vector<pair<int, int> > ff;
int main() {
  ios::sync_with_stdio(false);
  cin >> co[1] >> co[2] >> co[3];
  sort(co + 1, co + 4);
  cout << co[3] - co[1];
}
