#include <bits/stdc++.h>
int main(void) {
  int n[100];
  int i;
  int a[100];
  int max = 0, mim = 1000;
  for (i = 0; i <= sizeof(n) / sizeof(n[0]); i++) {
    scanf("%d\n", &a[i]);
    if (max < a[i]) {
      max = a[i];
    }
    if (mim > a[i]) {
      mim = a[i];
    }
  }
  printf("%d\n", max - mim);
  return 0;
}
