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;
		int max=sc.nextInt();
		int min=max;
		long g=max;
		
		for (int i=1;i<n;i++){
			a=sc.nextInt();
			g=g+a;
			if(max<a) max=a;
			if(min>a) min=a;
		}
		System.out.println(min+" "+max+" "+g);
	}

} 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;
		int max=sc.nextInt();
		int min=max;
		long g=max;
		
		for (int i=1;i<n;i++){
			a=sc.nextInt();
			g=g+a;
			if(max<a) max=a;
			if(min>a) min=a;
		}
		System.out.println(min+" "+max+" "+g);
	}

} Main public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		
		int a;
		int max=sc.nextInt();
		int min=max;
		long g=max;
		
		for (int i=1;i<n;i++){
			a=sc.nextInt();
			g=g+a;
			if(max<a) max=a;
			if(min>a) min=a;
		}
		System.out.println(min+" "+max+" "+g);
	} main {

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

	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		
		int a;
		int max=sc.nextInt();
		int min=max;
		long g=max;
		
		for (int i=1;i<n;i++){
			a=sc.nextInt();
			g=g+a;
			if(max<a) max=a;
			if(min>a) min=a;
		}
		System.out.println(min+" "+max+" "+g);
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		
		int a;
		int max=sc.nextInt();
		int min=max;
		long g=max;
		
		for (int i=1;i<n;i++){
			a=sc.nextInt();
			g=g+a;
			if(max<a) max=a;
			if(min>a) min=a;
		}
		System.out.println(min+" "+max+" "+g);
	}

} 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;
		int max=sc.nextInt();
		int min=max;
		long g=max;
		
		for (int i=1;i<n;i++){
			a=sc.nextInt();
			g=g+a;
			if(max<a) max=a;
			if(min>a) min=a;
		}
		System.out.println(min+" "+max+" "+g);
	}

}