#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,h[27]={0},i,j,s=0;
    cin>>n;
    int a[53]={0};
    for(i=0;i<n;i++){
        cin>>a[i];
    }
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(h[a[i]+a[j]]==0){
                s++;
                h[a[i]+a[j]]=1;
            }
        }
    }
    cout<<s<<endl;
    bool f=false;
    for(i=1;i<27;i++){
        if(h[i]==1){
            if(f) cout<<" ";
            else f=true;
            cout<<i;
        }
    }
    return 0;
}

/**************************************************************
	Problem: 1334
	User: admin
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/