#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int n=0,a[1000],x,i;
	double sum=0;
	cin>>x;
	while(x>0)
	{
		a[n]=x;
		sum+=a[n];
		n++;
		cin>>x;
		
	}
	sum/=n;
	cout<<sum<<endl;
	for(i=0;i<n;i++){
		if(a[i]<sum)
		cout<<a[i]<<" ";
		 
	}
	
	return 0;
}
