import java.io.*; public class No_9008{ public static void main(String args[]){ try{ long sum = 0; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int counter = Integer.parseInt(br.readLine()); if((2 <= counter) && (counter <= 500000)){ String sNumber = br.readLine(); String[] sNum = sNumber.split(" "); Long[] num = new Long[sNum.length]; for(int i = 0; i < num.length; i++){ num[i] = Long.parseLong(sNum[i]); sum += num[i]; } } System.out.println(sum); }catch(IOException e){} } }