#include using namespace std; long long a,minv=1000003; int main(void){ cin>>a; vector l; long long c; for (int i = 0; i < a; ++i) { cin>>c; l.push_back(c); } l.erase(unique(l.begin(), l.end()), l.end()); l.size(); for (int i = 0; i < l.size()-1; ++i) { minv=min(abs(l[i+1]-l[i]),minv); } cout<