#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int check(int n){
int ret=0;
while(n){
ret+=n%10;
n/=10;
}
return ret;
}
bool cmp(int a,int b){
return a>b;
}
int main(){
int t;
long long a[100003],ans[100003];
cin >> t;
for(int i=1;i<=t;i++) cin >> a[i];
for(int i=1;i<=t;i++){
ans[i]=check(a[i]);
}
sort(ans+1,ans+t+1,cmp);
cout << ans[1];
return 0;
}
这评测机有问题吧