int main(){ int n,d=-1; while(cin >>n){ if(n==1){ int h; cin >> h; cout << h <<"\n"; break; }//可有可無 優化程式用 int s[n]; for(int i=0;i<n;i++){ cin >> s[i]; if(s[i]>d){ d=s[i]; } } cout << d <<"\n";}}