import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int intSize = scan.nextInt();
		int intMin = 0;
		int intMax = 0;
		long longSum = 0;
		int intTemp = 0;
		for(int i = 0; i < intSize; i++){
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		}
		scan.close();
		System.out.println(intMin + " " + intMax + " " + longSum);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int intSize = scan.nextInt();
		int intMin = 0;
		int intMax = 0;
		long longSum = 0;
		int intTemp = 0;
		for(int i = 0; i < intSize; i++){
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		}
		scan.close();
		System.out.println(intMin + " " + intMax + " " + longSum);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int intSize = scan.nextInt();
		int intMin = 0;
		int intMax = 0;
		long longSum = 0;
		int intTemp = 0;
		for(int i = 0; i < intSize; i++){
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		}
		scan.close();
		System.out.println(intMin + " " + intMax + " " + longSum);
	} main {
		Scanner scan = new Scanner(System.in);
		int intSize = scan.nextInt();
		int intMin = 0;
		int intMax = 0;
		long longSum = 0;
		int intTemp = 0;
		for(int i = 0; i < intSize; i++){
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		}
		scan.close();
		System.out.println(intMin + " " + intMax + " " + longSum);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int intSize = scan.nextInt(); intSize scan.nextInt() scan.nextInt scan int intMin = 0; intMin 0 int intMax = 0; intMax 0 long longSum = 0; longSum 0 int intTemp = 0; intTemp 0 for(int i = 0; i < intSize; i++){
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		} int i = 0; int i = 0; i 0 i < intSize i intSize i++ i++ i {
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		} {
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		} intTemp = scan.nextInt() intTemp scan.nextInt() scan.nextInt scan longSum += intTemp longSum intTemp if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			} intMin == 0 intMin 0 {
				intMin = intTemp;
				intMax = intTemp;
			} intMin = intTemp intMin intTemp intMax = intTemp intMax intTemp if(intMax < intTemp){
				intMax = intTemp;
			} intMax < intTemp intMax intTemp {
				intMax = intTemp;
			} intMax = intTemp intMax intTemp if(intTemp < intMin){
				intMin = intTemp;
			} intTemp < intMin intTemp intMin {
				intMin = intTemp;
			} intMin = intTemp intMin intTemp scan.close() scan.close scan System.out.println(intMin + " " + intMax + " " + longSum) System.out.println System.out System System.out intMin + " " + intMax + " " + longSum " " intMax intMin + " " + intMax + " " + longSum intMin " " intMax " " longSum String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int intSize = scan.nextInt();
		int intMin = 0;
		int intMax = 0;
		long longSum = 0;
		int intTemp = 0;
		for(int i = 0; i < intSize; i++){
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		}
		scan.close();
		System.out.println(intMin + " " + intMax + " " + longSum);
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int intSize = scan.nextInt();
		int intMin = 0;
		int intMax = 0;
		long longSum = 0;
		int intTemp = 0;
		for(int i = 0; i < intSize; i++){
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		}
		scan.close();
		System.out.println(intMin + " " + intMax + " " + longSum);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int intSize = scan.nextInt();
		int intMin = 0;
		int intMax = 0;
		long longSum = 0;
		int intTemp = 0;
		for(int i = 0; i < intSize; i++){
			intTemp = scan.nextInt();
			longSum += intTemp;
			if(intMin == 0){
				intMin = intTemp;
				intMax = intTemp;
			}
			if(intMax < intTemp){
				intMax = intTemp;
			}
			if(intTemp < intMin){
				intMin = intTemp;
			}
		}
		scan.close();
		System.out.println(intMin + " " + intMax + " " + longSum);
	}
}