#include <bits/stdc++.h>
using namespace std;
int sum(vector a){
int ans = 0;
for(int i = 0; i<a.size(); i++){
ans+=a[i];
}
return ans;
}
int main(){
vector<int> a = {1, 2, 3, 4, 5, 6};
cout << sum(a) << endl;output: 21
return 0;
}