#include <stdio.h>
int main()
{
	int a = 0;
	float sum = 0.0;
	float average = 0.0;
	int i = 0, j = 0, temp;
	float arr[100] = { 0 };
	scanf("%d", &a);
	for (i = 0; i < a; i++)
	{
		scanf("%f", &arr[i]);
		sum = sum + arr[i];
	}
	average = sum / a;
	for (i = 0; i < a - 1; i++)
	{
		for (j = 0; j < a - 1 - i; j++)
		{
			if (arr[j] < arr[j + 1])
			{
				temp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = temp;
			}
		}
	}
	printf("%.2f %.2f %.2f", arr[0], arr[a-1], average);
	return 0;
}