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];
		long longArray[] = new long[n];
        for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        }

        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,intArray[i]);
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,intArray[i]);
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += longArray[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];
		long longArray[] = new long[n];
        for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        }

        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,intArray[i]);
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,intArray[i]);
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += longArray[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];
		long longArray[] = new long[n];
        for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        }

        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,intArray[i]);
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,intArray[i]);
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += longArray[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];
		long longArray[] = new long[n];
        for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        }

        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,intArray[i]);
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,intArray[i]);
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += longArray[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 intArray[] = new int[n]; intArray new int[n] n long longArray[] = new long[n]; longArray new long[n] n for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        } {
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        } intArray[i] = Integer.parseInt(line[i]) intArray[i] intArray i Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i longArray[i] = Long.parseLong(line[i]) longArray[i] longArray i Long.parseLong(line[i]) Long.parseLong Long line[i] line i int mi = Integer.MAX_VALUE; mi Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i=0; i<n; i++){
            mi = Math.min(mi,intArray[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            mi = Math.min(mi,intArray[i]);
        } {
            mi = Math.min(mi,intArray[i]);
        } mi = Math.min(mi,intArray[i]) mi Math.min(mi,intArray[i]) Math.min Math mi intArray[i] intArray 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,intArray[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            ma = Math.max(ma,intArray[i]);
        } {
            ma = Math.max(ma,intArray[i]);
        } ma = Math.max(ma,intArray[i]) ma Math.max(ma,intArray[i]) Math.max Math ma intArray[i] intArray i long sum = 0; sum 0 for (int i=0; i<n; i++){
            sum += longArray[i];
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            sum += longArray[i];
        } {
            sum += longArray[i];
        } sum += longArray[i] sum longArray[i] longArray 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];
		long longArray[] = new long[n];
        for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        }

        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,intArray[i]);
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,intArray[i]);
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += longArray[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];
		long longArray[] = new long[n];
        for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        }

        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,intArray[i]);
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,intArray[i]);
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += longArray[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];
		long longArray[] = new long[n];
        for (int i=0; i<n; i++){
            intArray[i] = Integer.parseInt(line[i]);
			longArray[i] = Long.parseLong(line[i]);
        }

        int mi = Integer.MAX_VALUE;
        for (int i=0; i<n; i++){
            mi = Math.min(mi,intArray[i]);
        }
        
        int ma = Integer.MIN_VALUE;
        for (int i=0; i<n; i++){
            ma = Math.max(ma,intArray[i]);
        }
        
        long sum = 0;
        for (int i=0; i<n; i++){
            sum += longArray[i];
        }
        System.out.printf("%s %s %s\n", mi , ma, sum);
    }
}