import java.util.*;

class Main {
        public static void main(String args[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        long N = sc.nextInt();
                        long minv = 100000001L, maxv = -1000000000L, sumv = 0;
                        for (int i = 0; i < N; i++) {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        }
                        System.out.println(minv + " " + maxv + " " + sumv);
                }
        }
} import java.util.*; util.* java class Main {
        public static void main(String args[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        long N = sc.nextInt();
                        long minv = 100000001L, maxv = -1000000000L, sumv = 0;
                        for (int i = 0; i < N; i++) {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        }
                        System.out.println(minv + " " + maxv + " " + sumv);
                }
        }
} Main public static void main(String args[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        long N = sc.nextInt();
                        long minv = 100000001L, maxv = -1000000000L, sumv = 0;
                        for (int i = 0; i < N; i++) {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        }
                        System.out.println(minv + " " + maxv + " " + sumv);
                }
        } main {
                try (Scanner sc = new Scanner(System.in)) {
                        long N = sc.nextInt();
                        long minv = 100000001L, maxv = -1000000000L, sumv = 0;
                        for (int i = 0; i < N; i++) {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        }
                        System.out.println(minv + " " + maxv + " " + sumv);
                }
        } try (Scanner sc = new Scanner(System.in)) {
                        long N = sc.nextInt();
                        long minv = 100000001L, maxv = -1000000000L, sumv = 0;
                        for (int i = 0; i < N; i++) {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        }
                        System.out.println(minv + " " + maxv + " " + sumv);
                } {
                        long N = sc.nextInt();
                        long minv = 100000001L, maxv = -1000000000L, sumv = 0;
                        for (int i = 0; i < N; i++) {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        }
                        System.out.println(minv + " " + maxv + " " + sumv);
                } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) long N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long minv = 100000001L minv 100000001L maxv = -1000000000L maxv -1000000000L 1000000000L sumv = 0; sumv 0 for (int i = 0; i < N; i++) {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        } {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        } long x = sc.nextInt(); x sc.nextInt() sc.nextInt sc minv = Math.min(x, minv) minv Math.min(x, minv) Math.min Math x minv maxv = Math.max(x, maxv) maxv Math.max(x, maxv) Math.max Math x maxv sumv += x sumv x System.out.println(minv + " " + maxv + " " + sumv) System.out.println System.out System System.out minv + " " + maxv + " " + sumv " " maxv minv + " " + maxv + " " + sumv minv " " maxv " " sumv String args[] args
import java.util.*;

class Main {
        public static void main(String args[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        long N = sc.nextInt();
                        long minv = 100000001L, maxv = -1000000000L, sumv = 0;
                        for (int i = 0; i < N; i++) {
                                long x = sc.nextInt();
                                minv = Math.min(x, minv);
                                maxv = Math.max(x, maxv);
                                sumv += x;
                        }
                        System.out.println(minv + " " + maxv + " " + sumv);
                }
        }
}