import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
         int n = scanner.nextInt();
        double[] score = new double[n];
        double sum = 0;
        for(int i = 0; i < score.length; i++) {
            score[i] = scanner.nextDouble();
            sum += score[i];
        }
        double maxScore = score[0];
        double minScore = score[0];
        for(int i = 1; i < score.length; i++) {
            if(score[i] > maxScore) {
                maxScore = score[i];
            }
            if(score[i] < minScore) {
                minScore = score[i];
            }
        }
        //平均分
        double averageScore = sum / n;
        System.out.printf("%.2f %.2f %.2f",maxScore, minScore, averageScore);
    }
}