#include #include #include #include #include using namespace std; int main(){ int n,k; int min = 1001; int max = 0; int in; cin >> n >> k; for(int i=0; i> in; if(in > max){ max = in; } if(in < min){ min = in; } } cout << max - min << endl; return 0; }