import java.util.Scanner;
public class Main {
	
	public static void main(String[] args) {
		
		int max = Integer.MIN_VALUE;
		int min = Integer.MAX_VALUE;
		long sum = 0;
		Scanner x = new Scanner(System.in);
		int n = x.nextInt();
		for (int i = 0 ; i < n ; i++){
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		}
		System.out.println(min +" "+ max +" "+ sum);
		
	}

} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		
		int max = Integer.MIN_VALUE;
		int min = Integer.MAX_VALUE;
		long sum = 0;
		Scanner x = new Scanner(System.in);
		int n = x.nextInt();
		for (int i = 0 ; i < n ; i++){
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		}
		System.out.println(min +" "+ max +" "+ sum);
		
	}

} Main public static void main(String[] args) {
		
		int max = Integer.MIN_VALUE;
		int min = Integer.MAX_VALUE;
		long sum = 0;
		Scanner x = new Scanner(System.in);
		int n = x.nextInt();
		for (int i = 0 ; i < n ; i++){
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		}
		System.out.println(min +" "+ max +" "+ sum);
		
	} main {
		
		int max = Integer.MIN_VALUE;
		int min = Integer.MAX_VALUE;
		long sum = 0;
		Scanner x = new Scanner(System.in);
		int n = x.nextInt();
		for (int i = 0 ; i < n ; i++){
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		}
		System.out.println(min +" "+ max +" "+ sum);
		
	} int max = Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE long sum = 0; sum 0 Scanner x = new Scanner(System.in); x new Scanner(System.in) int n = x.nextInt(); n x.nextInt() x.nextInt x for (int i = 0 ; i < n ; i++){
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		} {
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		} int a = x.nextInt(); a x.nextInt() x.nextInt x sum = sum +a sum sum +a sum a if(max < a){
				max = a;
			} max < a max a {
				max = a;
			} max = a max a if(min > a){
				min = a;
			} min > a min a {
				min = a;
			} min = a min a System.out.println(min +" "+ max +" "+ sum) System.out.println System.out System System.out min +" "+ max +" "+ sum " " max min +" "+ max +" "+ sum min " " max " " sum String[] args args public class Main {
	
	public static void main(String[] args) {
		
		int max = Integer.MIN_VALUE;
		int min = Integer.MAX_VALUE;
		long sum = 0;
		Scanner x = new Scanner(System.in);
		int n = x.nextInt();
		for (int i = 0 ; i < n ; i++){
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		}
		System.out.println(min +" "+ max +" "+ sum);
		
	}

} public class Main {
	
	public static void main(String[] args) {
		
		int max = Integer.MIN_VALUE;
		int min = Integer.MAX_VALUE;
		long sum = 0;
		Scanner x = new Scanner(System.in);
		int n = x.nextInt();
		for (int i = 0 ; i < n ; i++){
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		}
		System.out.println(min +" "+ max +" "+ sum);
		
	}

} Main
import java.util.Scanner;
public class Main {
	
	public static void main(String[] args) {
		
		int max = Integer.MIN_VALUE;
		int min = Integer.MAX_VALUE;
		long sum = 0;
		Scanner x = new Scanner(System.in);
		int n = x.nextInt();
		for (int i = 0 ; i < n ; i++){
			int a = x.nextInt();
			sum = sum +a;
			if(max < a){
				max = a;
			}
			if(min > a){
				min = a;
			}
		}
		System.out.println(min +" "+ max +" "+ sum);
		
	}

}