import java.math.BigDecimal;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n = stdIn.nextInt();
		int min = stdIn.nextInt();
		int max = min;
		BigDecimal sum = new BigDecimal(min);
		for(int i=0;i<n-1;i++){
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		}
		System.out.println(min+" "+max+" "+sum);
	}
} import java.math.BigDecimal; BigDecimal java.math import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n = stdIn.nextInt();
		int min = stdIn.nextInt();
		int max = min;
		BigDecimal sum = new BigDecimal(min);
		for(int i=0;i<n-1;i++){
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		}
		System.out.println(min+" "+max+" "+sum);
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n = stdIn.nextInt();
		int min = stdIn.nextInt();
		int max = min;
		BigDecimal sum = new BigDecimal(min);
		for(int i=0;i<n-1;i++){
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		}
		System.out.println(min+" "+max+" "+sum);
	} main {
		Scanner stdIn = new Scanner(System.in);

		int n = stdIn.nextInt();
		int min = stdIn.nextInt();
		int max = min;
		BigDecimal sum = new BigDecimal(min);
		for(int i=0;i<n-1;i++){
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		}
		System.out.println(min+" "+max+" "+sum);
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int min = stdIn.nextInt(); min stdIn.nextInt() stdIn.nextInt stdIn int max = min; max min BigDecimal sum = new BigDecimal(min); sum new BigDecimal(min) for(int i=0;i<n-1;i++){
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		} int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		} {
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		} int t = stdIn.nextInt(); t stdIn.nextInt() stdIn.nextInt stdIn min = Math.min(min, t) min Math.min(min, t) Math.min Math min t max = Math.max(max, t) max Math.max(max, t) Math.max Math max t sum = sum.add(new BigDecimal(t)) sum sum.add(new BigDecimal(t)) sum.add sum new BigDecimal(t) 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 stdIn = new Scanner(System.in);

		int n = stdIn.nextInt();
		int min = stdIn.nextInt();
		int max = min;
		BigDecimal sum = new BigDecimal(min);
		for(int i=0;i<n-1;i++){
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		}
		System.out.println(min+" "+max+" "+sum);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n = stdIn.nextInt();
		int min = stdIn.nextInt();
		int max = min;
		BigDecimal sum = new BigDecimal(min);
		for(int i=0;i<n-1;i++){
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		}
		System.out.println(min+" "+max+" "+sum);
	}
} Main
import java.math.BigDecimal;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n = stdIn.nextInt();
		int min = stdIn.nextInt();
		int max = min;
		BigDecimal sum = new BigDecimal(min);
		for(int i=0;i<n-1;i++){
			int t = stdIn.nextInt();
			min = Math.min(min, t);
			max = Math.max(max, t);
			sum = sum.add(new BigDecimal(t));
		}
		System.out.println(min+" "+max+" "+sum);
	}
}