#include <stdio.h> int main() { int num = 0; int arr[50] = {0}; int result = 0; while (scanf("%d",&num) != EOF) { for (int i = 0; i < num; i++) { scanf("%d ",&arr[i]); result += arr[i]; } printf("%d\n",result); } return 0; }