#include <bits/stdc++.h>

using namespace std;

int n,a,k;

long long br;

int niz[100000009];

int main () {

    cin>>n>>a;

    for (int i=1;i<=n;i++){
        cin>>niz[i];
        br+=niz[i];
    }

    if(a==0){
        cout<<br<<endl;
    }
    else if (a==1){
        cout<<3737<<endl;
    }



return 0;
}