import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String line[] = br.readLine().split(" ");
        //int intArray[] = new int[n];
        /*for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
        }
        */
        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,Integer.parseInt(line[i]));
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,Integer.parseInt(line[i]));
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += Long.parseLong(line[i]);
        }
        System.out.printf("%s %s %s\n", mi , ma, sum);
    }
} import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String line[] = br.readLine().split(" ");
        //int intArray[] = new int[n];
        /*for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
        }
        */
        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,Integer.parseInt(line[i]));
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,Integer.parseInt(line[i]));
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += Long.parseLong(line[i]);
        }
        System.out.printf("%s %s %s\n", mi , ma, sum);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String line[] = br.readLine().split(" ");
        //int intArray[] = new int[n];
        /*for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
        }
        */
        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,Integer.parseInt(line[i]));
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,Integer.parseInt(line[i]));
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += Long.parseLong(line[i]);
        }
        System.out.printf("%s %s %s\n", mi , ma, sum);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String line[] = br.readLine().split(" ");
        //int intArray[] = new int[n];
        /*for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
        }
        */
        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,Integer.parseInt(line[i]));
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,Integer.parseInt(line[i]));
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += Long.parseLong(line[i]);
        }
        System.out.printf("%s %s %s\n", mi , ma, sum);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String line[] = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int mi = Integer.MAX_VALUE; mi Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i=0; i<n; i++){
            mi = Math.min(mi,Integer.parseInt(line[i]));
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            mi = Math.min(mi,Integer.parseInt(line[i]));
        } {
            mi = Math.min(mi,Integer.parseInt(line[i]));
        } mi = Math.min(mi,Integer.parseInt(line[i])) mi Math.min(mi,Integer.parseInt(line[i])) Math.min Math mi Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i int ma = Integer.MIN_VALUE; ma Integer.MIN_VALUE Integer Integer.MIN_VALUE for (int i=0; i<n; i++){
            ma = Math.max(ma,Integer.parseInt(line[i]));
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            ma = Math.max(ma,Integer.parseInt(line[i]));
        } {
            ma = Math.max(ma,Integer.parseInt(line[i]));
        } ma = Math.max(ma,Integer.parseInt(line[i])) ma Math.max(ma,Integer.parseInt(line[i])) Math.max Math ma Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i long sum = 0; sum 0 for (int i=0; i<n; i++){
            sum += Long.parseLong(line[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            sum += Long.parseLong(line[i]);
        } {
            sum += Long.parseLong(line[i]);
        } sum += Long.parseLong(line[i]) sum Long.parseLong(line[i]) Long.parseLong Long line[i] line i System.out.printf("%s %s %s\n", mi , ma, sum) System.out.printf System.out System System.out "%s %s %s\n" mi ma sum String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String line[] = br.readLine().split(" ");
        //int intArray[] = new int[n];
        /*for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
        }
        */
        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,Integer.parseInt(line[i]));
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,Integer.parseInt(line[i]));
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += Long.parseLong(line[i]);
        }
        System.out.printf("%s %s %s\n", mi , ma, sum);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String line[] = br.readLine().split(" ");
        //int intArray[] = new int[n];
        /*for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
        }
        */
        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,Integer.parseInt(line[i]));
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,Integer.parseInt(line[i]));
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += Long.parseLong(line[i]);
        }
        System.out.printf("%s %s %s\n", mi , ma, sum);
    }
} Main
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String line[] = br.readLine().split(" ");
        //int intArray[] = new int[n];
        /*for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
        }
        */
        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,Integer.parseInt(line[i]));
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,Integer.parseInt(line[i]));
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += Long.parseLong(line[i]);
        }
        System.out.printf("%s %s %s\n", mi , ma, sum);
    }
}