#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    long long int num,ans;
    cin>>ans;
    for(int i=1;i<n;i++){
        cin>>num;
        ans+=num;
        if(i+1==n&&(i+1)%10!=0)ans/=(i+1)%10;
        else if((i+1)%10==0)ans/=10;
    }
    cout<<ans<<endl;
}