#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, x2, x3, max = 0, min = 0, count = 0;
  float x = 0;
  cin >> x1 >> x2 >> x3;
  if (x1 > x2 && x1 > x3)
    max = x1;
  else if (x2 > x1 && x2 > x3)
    max = x2;
  else
    max = x3;
  if (x1 < x2 && x1 < x3)
    min = x1;
  else if (x2 < x1 && x2 < x3)
    min = x2;
  else
    min = x3;
  x = x1 + x2 + x3;
  x = x - max - min;
  count = count + max - x;
  count = count + x - min;
  cout << count;
}
