import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x;
		int max = 0;
		int min = 0;
		long sum = 0;
		int n = scan.nextInt();//??´??°??\???n???
		for (int i = 0; i < n; i++) { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		}
		System.out.println(min + " " + max + " " + sum);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x;
		int max = 0;
		int min = 0;
		long sum = 0;
		int n = scan.nextInt();//??´??°??\???n???
		for (int i = 0; i < n; i++) { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		}
		System.out.println(min + " " + max + " " + sum);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x;
		int max = 0;
		int min = 0;
		long sum = 0;
		int n = scan.nextInt();//??´??°??\???n???
		for (int i = 0; i < n; i++) { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		}
		System.out.println(min + " " + max + " " + sum);
	} main {
		Scanner scan = new Scanner(System.in);
		int x;
		int max = 0;
		int min = 0;
		long sum = 0;
		int n = scan.nextInt();//??´??°??\???n???
		for (int i = 0; i < n; i++) { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		}
		System.out.println(min + " " + max + " " + sum);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int x; x int max = 0; max 0 int min = 0; min 0 long sum = 0; sum 0 int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan for (int i = 0; i < n; i++) { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		} { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		} x = scan.nextInt() x scan.nextInt() scan.nextInt scan if (i == 0) { //?????????com???????????£??\
				min = max = x;
			} i == 0 i 0 { //?????????com???????????£??\
				min = max = x;
			} min = max = x min max = x max x if (min > x) { //????°????
				min = x;
			} min > x min x { //????°????
				min = x;
			} min = x min x if (max < x) { //?????§???
				max = x;
			} max < x max x { //?????§???
				max = x;
			} max = x max x sum += x sum x 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 scan = new Scanner(System.in);
		int x;
		int max = 0;
		int min = 0;
		long sum = 0;
		int n = scan.nextInt();//??´??°??\???n???
		for (int i = 0; i < n; i++) { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		}
		System.out.println(min + " " + max + " " + sum);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x;
		int max = 0;
		int min = 0;
		long sum = 0;
		int n = scan.nextInt();//??´??°??\???n???
		for (int i = 0; i < n; i++) { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		}
		System.out.println(min + " " + max + " " + sum);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x;
		int max = 0;
		int min = 0;
		long sum = 0;
		int n = scan.nextInt();//??´??°??\???n???
		for (int i = 0; i < n; i++) { //i???n???????°??????????????????°?????????
			x = scan.nextInt();//n????????????????????§??????????°??????\???
			if (i == 0) { //?????????com???????????£??\
				min = max = x;
			}
			if (min > x) { //????°????
				min = x;
			}
			if (max < x) { //?????§???
				max = x;
			}
			sum += x; //????¨????
		}
		System.out.println(min + " " + max + " " + sum);
	}
}