#include<stdio.h>
int main()
{
    int i=0,n,x;
    scanf("%d",&n);
    scanf("%d",&x);
    int a[i],d[i];
    d[0]=0;
    do
    {
        scanf("%d",&a[i]);
        if(i>=2&&i<=n+1)
        d[i]=d[i-1]+a[i];
        i++;
    }while(i<n);
    printf("%d",d[i]);
}
