#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
int dx2[] = {1, -1, -1, 1, 0, 0, -1, 1};
int dy2[] = {1, -1, 1, -1, 1, -1, 0, 0};
int kmx[] = {-1, -1, 1, 1, 2, -2, 2, -2};
int kmy[] = {2, -2, 2, -2, -1, -1, 1, 1};
int bishopX[] = {-1, 1, -1, 1};
int bishopY[] = {-1, -1, 1, 1};
class Timer {
 public:
  clock_t T;
  Timer() { T = clock(); }
  ~Timer() {
    fprintf(stderr, "\n%.3f\n", double(clock() - T) / CLOCKS_PER_SEC);
  }
};
int read() {
  int x;
  scanf("%d", &x);
  return x;
}
long long readL() {
  long long x;
  scanf("%lld", &x);
  return x;
}
const int N = 0;
int main() {
  int x1 = read();
  int x2 = read();
  int x3 = read();
  int mn = 1000000000;
  for (int i = 1; i <= 100; i++) {
    int tot = abs(i - x1) + abs(i - x2) + abs(i - x3);
    if (tot < mn) {
      mn = tot;
    }
  }
  printf("%d\n", mn);
  return 0;
}
