import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		long min=0, max=0, sum=0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a= new int[n];
		for (int i=0; i < n; i++) {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		}
		System.out.println(min + " " + max + " " + sum);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		long min=0, max=0, sum=0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a= new int[n];
		for (int i=0; i < n; i++) {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		}
		System.out.println(min + " " + max + " " + sum);
	}

} Main public static void main(String[] args) {
		long min=0, max=0, sum=0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a= new int[n];
		for (int i=0; i < n; i++) {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		}
		System.out.println(min + " " + max + " " + sum);
	} main {
		long min=0, max=0, sum=0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a= new int[n];
		for (int i=0; i < n; i++) {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		}
		System.out.println(min + " " + max + " " + sum);
	} long min=0 min 0 max=0 max 0 sum=0; sum 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a= new int[n]; a new int[n] n for (int i=0; i < n; i++) {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		} int i=0; int i=0; i 0 i < n i n i++ i++ i {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		} {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			} i == 0 i 0 {
				min = a[i];
				max = a[i];
				sum = a[i];
			} min = a[i] min a[i] a i max = a[i] max a[i] a i sum = a[i] sum a[i] a i {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			} if (min > a[i]) {
					min = a[i];
				} min > a[i] min a[i] a i {
					min = a[i];
				} min = a[i] min a[i] a i if (max < a[i]) {
					max = a[i];
				} max < a[i] max a[i] a i {
					max = a[i];
				} max = a[i] max a[i] a i sum = sum + a[i] sum sum + a[i] sum 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 String[] args args public class Main {
	public static void main(String[] args) {
		long min=0, max=0, sum=0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a= new int[n];
		for (int i=0; i < n; i++) {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		}
		System.out.println(min + " " + max + " " + sum);
	}

} public class Main {
	public static void main(String[] args) {
		long min=0, max=0, sum=0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a= new int[n];
		for (int i=0; i < n; i++) {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		}
		System.out.println(min + " " + max + " " + sum);
	}

} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		long min=0, max=0, sum=0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a= new int[n];
		for (int i=0; i < n; i++) {
			a[i] = sc.nextInt();
			if (i == 0) {
				min = a[i];
				max = a[i];
				sum = a[i];
			} else {
				if (min > a[i]) {
					min = a[i];
				}
				if (max < a[i]) {
					max = a[i];
				}
				sum = sum + a[i];
			}
		}
		System.out.println(min + " " + max + " " + sum);
	}

}