    #include <iostream>
    using namespace std;
        int main()
        {
	   int  i, n, number;
        int  sum=0, max1, max2;
        cout<<" please enter n : ";
        cin>>n;
          cout<<" enter number : ";
        max1 = max2 = -1;
		   for (i=1 ; i<=n ; i++)
	      {
	        cin>>number;
		        sum += number;
		        if (number > max1)
	          {
		            max2 = max1;
	            max1 = number;
		          }
		       else if (number > max2)
	        max2 = number;
		         }
	   cout<<" Sum = "<< sum<<" , Maximum 1= "<<max1<< " , Maximum 2= "<< max2<<endl;
        return 0;
		 }
