#include <iostream>
using namespace std;
int KAGE(int n) {
int sum = 0;
for (int i = 0; i < n; i++) {
int num;
cin >> num;
if (num >= 10) {
num = num % 10;
}
sum = sum + num;
}
}
int main() {
long n;
cin >> n;
cout << endl;
int b = KAGE(n);
return 0;
}