#include #define PB push_back #define MP make_pair #define REP(i,n) for (int i=0;i<(n);i++) #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define ALL(a) (a).begin(),(a).end() using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair P; const int INF=1e9; int main(){ int n; cin>>n; vector x(n); REP(i,n)cin>>x[i]; sort(ALL(x)); x.erase(unique(ALL(x)),x.end()); int ans=INF; REP(i,x.size())if(i!=0)ans=min(ans,x[i]-x[i-1]); if(ans!=INF)cout<