import java.util.Scanner;

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