import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int min = 0;
		int max = 0;
		long sum = 0;
		for(int i = 0; i < n; i++){
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		}
		System.out.printf("%d %d %d\n", min, max, sum);
	}
} import java.util.*; util.* java public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int min = 0;
		int max = 0;
		long sum = 0;
		for(int i = 0; i < n; i++){
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		}
		System.out.printf("%d %d %d\n", min, max, sum);
	}
} Main private static final Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String[] args){
		int n = scan.nextInt();
		int min = 0;
		int max = 0;
		long sum = 0;
		for(int i = 0; i < n; i++){
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		}
		System.out.printf("%d %d %d\n", min, max, sum);
	} main {
		int n = scan.nextInt();
		int min = 0;
		int max = 0;
		long sum = 0;
		for(int i = 0; i < n; i++){
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		}
		System.out.printf("%d %d %d\n", min, max, sum);
	} int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int min = 0; min 0 int max = 0; max 0 long sum = 0; sum 0 for(int i = 0; i < n; i++){
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		} {
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		} int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan sum += a sum a if(i == 0){
				min = a;
				max = a;
			} i == 0 i 0 {
				min = a;
				max = a;
			} min = a min a max = a max a if(min > a){
				min = a;
			} min > a min a {
				min = a;
			} min = a min a if(max < a){
				max = a;
			} max < a max a {
				max = a;
			} max = a max a System.out.printf("%d %d %d\n", min, max, sum) System.out.printf System.out System System.out "%d %d %d\n" min max sum String[] args args public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int min = 0;
		int max = 0;
		long sum = 0;
		for(int i = 0; i < n; i++){
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		}
		System.out.printf("%d %d %d\n", min, max, sum);
	}
} public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int min = 0;
		int max = 0;
		long sum = 0;
		for(int i = 0; i < n; i++){
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		}
		System.out.printf("%d %d %d\n", min, max, sum);
	}
} Main
import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int min = 0;
		int max = 0;
		long sum = 0;
		for(int i = 0; i < n; i++){
			int a = scan.nextInt();
			sum += a;
			if(i == 0){
				min = a;
				max = a;
			}
			if(min > a){
				min = a;
			}
			if(max < a){
				max = a;
			}
		}
		System.out.printf("%d %d %d\n", min, max, sum);
	}
}