#include <iostream>
using namespace std;
int v[100],n;
int suma(int n){
if(n==0) return 0;
else return v[i]+suma(i-1)
}
int prod(int n){
if(n==0) return 1;
else return v[i]*prod(i-1);
}
int main(){
//Citire vector
cin >> n;
for(i=1;i<=n;i++) cin >> v[i];
//Afisare rezultat
cout << suma(n) << endl;
cout << prod(n);
}