import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

//成绩分析（利用集合） 
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> list = new ArrayList<>();
        int n = scan.nextInt();
        double sum = 0;
        for (int i = 0; i < n; i++) {
            list.add(scan.nextInt());
            sum = sum + list.get(i);
        }
        Collections.sort(list);
        System.out.println(Collections.max(list));
        System.out.println(Collections.min(list));
        System.out.println(String.format("%.2f", sum / n));
        scan.close();
    }
}
