# -*- coding: utf-8 -*-
# @Author: deepanshu
# @Date:   2015-12-06 05:10:54
# @Last Modified by:   deepanshu
# @Last Modified time: 2016-05-02 03:44:56
print str(sum(long(raw_input())for i in xrange(int(raw_input()))))[:10]