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