#include using namespace std; int main() { int i; int N; int K; int n; int iMax; int iMin; cin >> N; cin >> K; iMax = 0; iMin = 1000; for( i = 0; i < N; i++ ) { cin >> n; if( iMax < n ) iMax = n; if( iMin > n ) iMin = n; } cout << iMax - iMin << endl; return 0; }