import java.util.Scanner;

public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int a[] = new int[n];
		long max, min , sum;
		for(int i = 0 ; i < n; i++){
			a[i] = s.nextInt();
		}
		max = a[0];
		min = a[0];
		sum = a[0];
		for(int i = 1; i < n; i++){
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		}
		System.out.println(min + " " + max + " " + sum);
		
			
	}
	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int a[] = new int[n];
		long max, min , sum;
		for(int i = 0 ; i < n; i++){
			a[i] = s.nextInt();
		}
		max = a[0];
		min = a[0];
		sum = a[0];
		for(int i = 1; i < n; i++){
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		}
		System.out.println(min + " " + max + " " + sum);
		
			
	}
	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
} Main void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int a[] = new int[n];
		long max, min , sum;
		for(int i = 0 ; i < n; i++){
			a[i] = s.nextInt();
		}
		max = a[0];
		min = a[0];
		sum = a[0];
		for(int i = 1; i < n; i++){
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		}
		System.out.println(min + " " + max + " " + sum);
		
			
	} run {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int a[] = new int[n];
		long max, min , sum;
		for(int i = 0 ; i < n; i++){
			a[i] = s.nextInt();
		}
		max = a[0];
		min = a[0];
		sum = a[0];
		for(int i = 1; i < n; i++){
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		}
		System.out.println(min + " " + max + " " + sum);
		
			
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int a[] = new int[n]; a new int[n] n long max max min min sum; sum for(int i = 0 ; i < n; i++){
			a[i] = s.nextInt();
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			a[i] = s.nextInt();
		} {
			a[i] = s.nextInt();
		} a[i] = s.nextInt() a[i] a i s.nextInt() s.nextInt s max = a[0] max a[0] a 0 min = a[0] min a[0] a 0 sum = a[0] sum a[0] a 0 for(int i = 1; i < n; i++){
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		} {
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		} sum += a[i] sum a[i] a i max = Math.max(max, a[i]) max Math.max(max, a[i]) Math.max Math max a[i] a i min = Math.min(min, a[i]) min Math.min(min, a[i]) Math.min Math min a[i] a i System.out.println(min + " " + max + " " + sum) System.out.println System.out System System.out min + " " + max + " " + sum " " max min + " " + max + " " + sum min " " max " " sum public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	} main {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int a[] = new int[n];
		long max, min , sum;
		for(int i = 0 ; i < n; i++){
			a[i] = s.nextInt();
		}
		max = a[0];
		min = a[0];
		sum = a[0];
		for(int i = 1; i < n; i++){
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		}
		System.out.println(min + " " + max + " " + sum);
		
			
	}
	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
} public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int a[] = new int[n];
		long max, min , sum;
		for(int i = 0 ; i < n; i++){
			a[i] = s.nextInt();
		}
		max = a[0];
		min = a[0];
		sum = a[0];
		for(int i = 1; i < n; i++){
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		}
		System.out.println(min + " " + max + " " + sum);
		
			
	}
	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
} Main
import java.util.Scanner;

public class Main {
	void run(){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int a[] = new int[n];
		long max, min , sum;
		for(int i = 0 ; i < n; i++){
			a[i] = s.nextInt();
		}
		max = a[0];
		min = a[0];
		sum = a[0];
		for(int i = 1; i < n; i++){
			sum += a[i];
			max = Math.max(max, a[i]);
			min = Math.min(min, a[i]);
		
		}
		System.out.println(min + " " + max + " " + sum);
		
			
	}
	public static void main(String[] args) {
		/* 
		 * Main x;
		 * x = new Main();
		 * x.run();
		 * ??¨????????????
		 */
		new Main().run();
		
	}
}