#include using namespace std; int main(){ int N,K; cin >> N >> K; vector A(N); for(int i=0;i> A[i]; sort(A.begin(),A.end()); cout << A[N-1]-A[0] << endl; }