#include <stdio.h>
#include <stdlib.h>

// write your code here......
struct node
{
    int data;
    struct node *next;

};
int main()
 {

    int n;
    scanf("%d",&n);
    int num[100];
    for(int i=0;i<n;i++)
    scanf("%d",&num[i]);
    struct node *head=(struct node*)malloc(sizeof(struct node));
    if(head==NULL)
    {
        exit(1);
    }
    head->next=NULL;
    struct node *p=head;
    for(int k=0;k<n;k++)
    {
        struct node *current=(struct node*)malloc(sizeof(struct node));
        if(current==NULL)
        {
          exit(1);
        }
        current->data=num[k];
        current->next=NULL;
        p->next=current;
        p=p->next;
    }
    p=head->next;
    int sum=0;
    while(p!=NULL)
    {
       sum+=p->data;
       p=p->next;
    }
    printf("%d",sum);
    return 0;
}