#include using namespace std; int main(){ int N,K; cin >> N >> K; vectornum(N); for(int i=0; i> num.at(i); } sort(num.begin(),num.end()); cout << num.at(N-1)-num.at(0) << endl; return 0; }