public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
			int n = scan.nextInt();
			long min,max,sum = 0;
			long[] arr = new long[n];

			for(int i = 0;i < n;i++){
				arr[i] = scan.nextInt();
			}

			min = arr[0];
			max = arr[0];

			for(int i = 0; i < arr.length; i++){
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			}
			for(int i = 0; i < arr.length; i++){
				sum += arr[i];
			}
			System.out.println(min + " " + max + " " + sum);

	}

} public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
			int n = scan.nextInt();
			long min,max,sum = 0;
			long[] arr = new long[n];

			for(int i = 0;i < n;i++){
				arr[i] = scan.nextInt();
			}

			min = arr[0];
			max = arr[0];

			for(int i = 0; i < arr.length; i++){
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			}
			for(int i = 0; i < arr.length; i++){
				sum += arr[i];
			}
			System.out.println(min + " " + max + " " + sum);

	}

} Main public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
			int n = scan.nextInt();
			long min,max,sum = 0;
			long[] arr = new long[n];

			for(int i = 0;i < n;i++){
				arr[i] = scan.nextInt();
			}

			min = arr[0];
			max = arr[0];

			for(int i = 0; i < arr.length; i++){
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			}
			for(int i = 0; i < arr.length; i++){
				sum += arr[i];
			}
			System.out.println(min + " " + max + " " + sum);

	} main {
		java.util.Scanner scan = new java.util.Scanner(System.in);
			int n = scan.nextInt();
			long min,max,sum = 0;
			long[] arr = new long[n];

			for(int i = 0;i < n;i++){
				arr[i] = scan.nextInt();
			}

			min = arr[0];
			max = arr[0];

			for(int i = 0; i < arr.length; i++){
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			}
			for(int i = 0; i < arr.length; i++){
				sum += arr[i];
			}
			System.out.println(min + " " + max + " " + sum);

	} java.util.Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan long min min max max sum = 0; sum 0 long[] arr = new long[n]; arr new long[n] n for(int i = 0;i < n;i++){
				arr[i] = scan.nextInt();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				arr[i] = scan.nextInt();
			} {
				arr[i] = scan.nextInt();
			} arr[i] = scan.nextInt() arr[i] arr i scan.nextInt() scan.nextInt scan min = arr[0] min arr[0] arr 0 max = arr[0] max arr[0] arr 0 for(int i = 0; i < arr.length; i++){
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			} int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i {
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			} {
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			} if(min > arr[i]){
					min = arr[i];
				} min > arr[i] min arr[i] arr i {
					min = arr[i];
				} min = arr[i] min arr[i] arr i if(max < arr[i]){
					max = arr[i];
				} max < arr[i] max arr[i] arr i {
					max = arr[i];
				} max = arr[i] max arr[i] arr i for(int i = 0; i < arr.length; i++){
				sum += arr[i];
			} int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i {
				sum += arr[i];
			} {
				sum += arr[i];
			} sum += arr[i] sum arr[i] arr 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){
		java.util.Scanner scan = new java.util.Scanner(System.in);
			int n = scan.nextInt();
			long min,max,sum = 0;
			long[] arr = new long[n];

			for(int i = 0;i < n;i++){
				arr[i] = scan.nextInt();
			}

			min = arr[0];
			max = arr[0];

			for(int i = 0; i < arr.length; i++){
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			}
			for(int i = 0; i < arr.length; i++){
				sum += arr[i];
			}
			System.out.println(min + " " + max + " " + sum);

	}

} public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
			int n = scan.nextInt();
			long min,max,sum = 0;
			long[] arr = new long[n];

			for(int i = 0;i < n;i++){
				arr[i] = scan.nextInt();
			}

			min = arr[0];
			max = arr[0];

			for(int i = 0; i < arr.length; i++){
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			}
			for(int i = 0; i < arr.length; i++){
				sum += arr[i];
			}
			System.out.println(min + " " + max + " " + sum);

	}

} Main
public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
			int n = scan.nextInt();
			long min,max,sum = 0;
			long[] arr = new long[n];

			for(int i = 0;i < n;i++){
				arr[i] = scan.nextInt();
			}

			min = arr[0];
			max = arr[0];

			for(int i = 0; i < arr.length; i++){
				if(min > arr[i]){
					min = arr[i];
				}
				if(max < arr[i]){
					max = arr[i];
				}
			}
			for(int i = 0; i < arr.length; i++){
				sum += arr[i];
			}
			System.out.println(min + " " + max + " " + sum);

	}

}