include <iostream>
#include <cmath>
#include <vector>

using namespace std;

int main(){
  int num;
  cin >> num;

  vector<int> LONGINT(num, 0);
  long long int larger; // 8?????????                                                        
  long long int smaller;        // 8?????????                                                

  int sum = 0;
  while(true){
    larger = 0;
    smaller = 0;
    for(int i=0;i<num;i++){
      cin >> LONGINT[i];
      // ???8???????????????.                                                                   
      smaller += (long long int)(LONGINT[i]%(int)pow(10.0, 8.0));
      larger += (long long int)(LONGINT[i]/(int)pow(10.0,8.0));
    }
    larger += smaller/pow(10,8);
    smaller = smaller%(int)pow(10,8);
    if(larger!=0){
      cout << larger << smaller << endl;
    }
  }
}