#include<iostream>
using namespace std;

int main(){
    int n, arr[n],sum=0;
    cout<<"enter the size of the array"<<endl;
cin>>n;

for(int i=0;i<n;i++){
    cin>>arr[i];
}
for(int i=0;i<n;i++){
    for(int j=i;i<n;j++){
sum=sum+arr[j];

    }
}
cout<<"sum is: -"<<sum<<endl;
}