import java.util.Scanner;
import java.util.stream.LongStream;


public class Main {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)){
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.stream.LongStream; LongStream java.util.stream public class Main {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)){
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		}
	}
} Main public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)){
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		}
	} main {
		try(Scanner scanner = new Scanner(System.in)){
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		}
	} try(Scanner scanner = new Scanner(System.in)){
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		} {
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner long[] list = new long[N]; list new long[N] N for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			} int i=0; int i=0; i 0 i<N i N i++ i++ i {
				list[i] = scanner.nextInt();
			} {
				list[i] = scanner.nextInt();
			} list[i] = scanner.nextInt() list[i] list i scanner.nextInt() scanner.nextInt scanner long min = LongStream.of(list).min().getAsLong(); min LongStream.of(list).min().getAsLong() LongStream.of(list).min().getAsLong LongStream.of(list).min() LongStream.of(list).min LongStream.of(list) LongStream.of LongStream list long max = LongStream.of(list).max().getAsLong(); max LongStream.of(list).max().getAsLong() LongStream.of(list).max().getAsLong LongStream.of(list).max() LongStream.of(list).max LongStream.of(list) LongStream.of LongStream list long sum = LongStream.of(list).sum(); sum LongStream.of(list).sum() LongStream.of(list).sum LongStream.of(list) LongStream.of LongStream list 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) {
		try(Scanner scanner = new Scanner(System.in)){
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		}
	}
} public class Main {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)){
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		}
	}
} Main
import java.util.Scanner;
import java.util.stream.LongStream;


public class Main {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)){
			int N = scanner.nextInt();
			long[] list = new long[N];
			for(int i=0;i<N;i++){
				list[i] = scanner.nextInt();
			}
			long min = LongStream.of(list).min().getAsLong();
			long max = LongStream.of(list).max().getAsLong();
			long sum = LongStream.of(list).sum();
			System.out.println(min+" "+max+" "+sum);
		}
	}
}