import java.util.Scanner;

public class Main {
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		int[] array = new int[size];
		int min=1000000, max=-1000000;
		long sum=0;
		
		if(0<=size && size<=10000){
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		}
		System.out.println(min+" "+max+" "+sum);
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
} import java.util.Scanner; Scanner java.util public class Main {
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		int[] array = new int[size];
		int min=1000000, max=-1000000;
		long sum=0;
		
		if(0<=size && size<=10000){
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		}
		System.out.println(min+" "+max+" "+sum);
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
} Main private void calc(){
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		int[] array = new int[size];
		int min=1000000, max=-1000000;
		long sum=0;
		
		if(0<=size && size<=10000){
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		}
		System.out.println(min+" "+max+" "+sum);
	} calc {
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		int[] array = new int[size];
		int min=1000000, max=-1000000;
		long sum=0;
		
		if(0<=size && size<=10000){
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		}
		System.out.println(min+" "+max+" "+sum);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int size = scanner.nextInt(); size scanner.nextInt() scanner.nextInt scanner int[] array = new int[size]; array new int[size] size int min=1000000 min 1000000 max=-1000000; max -1000000 1000000 long sum=0; sum 0 if(0<=size && size<=10000){
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		} 0<=size && size<=10000 0<=size 0 size size<=10000 size 10000 {
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		} for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			} int i=0; int i=0; i 0 i<array.length i array.length array array.length i++ i++ i {
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			} {
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			} array[i] = scanner.nextInt() array[i] array i scanner.nextInt() scanner.nextInt scanner if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				} -1000000<=array[i] && array[i]<=1000000 -1000000<=array[i] -1000000 1000000 array[i] array i array[i]<=1000000 array[i] array i 1000000 {
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				} if(min>array[i])min=array[i]; min>array[i] min array[i] array i min=array[i] min array[i] array i if(max<array[i])max=array[i]; max<array[i] max array[i] array i max=array[i] max array[i] array i sum +=array[i] sum array[i] array i System.out.println(min+" "+max+" "+sum) System.out.println System.out System System.out min+" "+max+" "+sum " " max min+" "+max+" "+sum min " " max " " sum public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	} main {
		Main run =new Main();
		run.calc();

	} Main run =new Main(); run new Main() run.calc() run.calc run String[] args args public class Main {
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		int[] array = new int[size];
		int min=1000000, max=-1000000;
		long sum=0;
		
		if(0<=size && size<=10000){
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		}
		System.out.println(min+" "+max+" "+sum);
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
} public class Main {
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		int[] array = new int[size];
		int min=1000000, max=-1000000;
		long sum=0;
		
		if(0<=size && size<=10000){
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		}
		System.out.println(min+" "+max+" "+sum);
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
} Main
import java.util.Scanner;

public class Main {
	private void calc(){
		Scanner scanner = new Scanner(System.in);
		int size = scanner.nextInt();
		int[] array = new int[size];
		int min=1000000, max=-1000000;
		long sum=0;
		
		if(0<=size && size<=10000){
			for(int i=0; i<array.length; i++){
				array[i] = scanner.nextInt();
				if(-1000000<=array[i] && array[i]<=1000000){
					if(min>array[i])min=array[i];
					if(max<array[i])max=array[i];
					sum +=array[i];	
				}
			}	
		}
		System.out.println(min+" "+max+" "+sum);
	}
	
	public static void main(String[] args) {
		Main run =new Main();
		run.calc();

	}
}