#include <bits/stdc++.h>
using namespace std;
long long int i, a[1000], c, m, mi, k;
int main() {
  for (i = 1; i <= 3; i++) cin >> a[i];
  for (c = 1; c <= 3; c++) {
    m = a[c];
    mi = c;
    for (i = c + 1; i <= 3; i++)
      if (a[i] < m) {
        m = a[i];
        mi = i;
      }
    k = a[c];
    a[c] = m;
    a[mi] = k;
  }
  cout << a[3] - a[1];
}
