#include<iostream>
using namespace std;

int main()
{
int height, small=0, big=0;
bool x=1;
while(cin>>height)
{
 if(x)
 {
   small = height;
   big = height;
   x = 0;
  }
 else if ( height > big ) { big = height; }
 else if ( height < small) { small = height; }
}
 cout<<big-small<<endl;
return 0;
}