import java.io.*; public class No_9009{ 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)){ long[] num = new long[counter]; for(int i = 0; i < num.length; i++){ num[i] = Long.parseLong(br.readLine()); sum += num[i]; } } System.out.println(sum); }catch(IOException e){} } }