#include <iostream>
using namespace std;
int main() {
int N , total=0;
cout<<"Enter the number of days: ";
cin>>N;
int * saves = new int[N];
cout<<"Enter the saving for each day"<<endl;
for(int i=0; i<N;i++){
cin>> saves[i];
}
for(int i=0; i<N;i++){
total+= saves[i];
}
cout<<"The total saving is: " <<total;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgTiAsIHRvdGFsPTA7Cgljb3V0PDwiRW50ZXIgdGhlIG51bWJlciBvZiBkYXlzOiAiOwoJY2luPj5OOwoJaW50ICogc2F2ZXMgPSBuZXcgaW50W05dOwoJY291dDw8IkVudGVyIHRoZSBzYXZpbmcgZm9yIGVhY2ggZGF5Ijw8ZW5kbDsKCWZvcihpbnQgaT0wOyBpPE47aSsrKXsKCQljaW4+PiBzYXZlc1tpXTsKCX0KCWZvcihpbnQgaT0wOyBpPE47aSsrKXsKCQl0b3RhbCs9IHNhdmVzW2ldOwoJfQogICBjb3V0PDwiVGhlIHRvdGFsIHNhdmluZyBpczogIiA8PHRvdGFsOwoJcmV0dXJuIDA7Cn0=