public class Main {

	public void run(java.io.InputStream in, java.io.PrintStream out) {
		final java.util.Scanner sc = new java.util.Scanner(in);
		long min, max, sum;
		int n;
		
		n = sc.nextInt();
		min = Long.MAX_VALUE;
		max = Long.MIN_VALUE;
		sum = 0;
		for (int i = 0; i < n; ++i) {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		}
		out.println(min + " " + max + " " + sum);
		
		sc.close();
	}
	
	public static void main(String[] args) {
		(new Main()).run(System.in, System.out);
	}

} public class Main {

	public void run(java.io.InputStream in, java.io.PrintStream out) {
		final java.util.Scanner sc = new java.util.Scanner(in);
		long min, max, sum;
		int n;
		
		n = sc.nextInt();
		min = Long.MAX_VALUE;
		max = Long.MIN_VALUE;
		sum = 0;
		for (int i = 0; i < n; ++i) {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		}
		out.println(min + " " + max + " " + sum);
		
		sc.close();
	}
	
	public static void main(String[] args) {
		(new Main()).run(System.in, System.out);
	}

} Main public void run(java.io.InputStream in, java.io.PrintStream out) {
		final java.util.Scanner sc = new java.util.Scanner(in);
		long min, max, sum;
		int n;
		
		n = sc.nextInt();
		min = Long.MAX_VALUE;
		max = Long.MIN_VALUE;
		sum = 0;
		for (int i = 0; i < n; ++i) {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		}
		out.println(min + " " + max + " " + sum);
		
		sc.close();
	} run {
		final java.util.Scanner sc = new java.util.Scanner(in);
		long min, max, sum;
		int n;
		
		n = sc.nextInt();
		min = Long.MAX_VALUE;
		max = Long.MIN_VALUE;
		sum = 0;
		for (int i = 0; i < n; ++i) {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		}
		out.println(min + " " + max + " " + sum);
		
		sc.close();
	} final java.util.Scanner sc = new java.util.Scanner(in); sc new java.util.Scanner(in) long min min max max sum; sum int n; n n = sc.nextInt() n sc.nextInt() sc.nextInt sc min = Long.MAX_VALUE min Long.MAX_VALUE Long Long.MAX_VALUE max = Long.MIN_VALUE max Long.MIN_VALUE Long Long.MIN_VALUE sum = 0 sum 0 for (int i = 0; i < n; ++i) {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		} {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		} final long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc if (a < min) min = a; a < min a min min = a min a if (max < a) max = a; max < a max a max = a max a sum += a sum a out.println(min + " " + max + " " + sum) out.println out min + " " + max + " " + sum " " max min + " " + max + " " + sum min " " max " " sum sc.close() sc.close sc java.io.InputStream in in java.io.PrintStream out out public static void main(String[] args) {
		(new Main()).run(System.in, System.out);
	} main {
		(new Main()).run(System.in, System.out);
	} (new Main()).run(System.in, System.out) (new Main()).run (new Main()) System.in System System.in System.out System System.out String[] args args public class Main {

	public void run(java.io.InputStream in, java.io.PrintStream out) {
		final java.util.Scanner sc = new java.util.Scanner(in);
		long min, max, sum;
		int n;
		
		n = sc.nextInt();
		min = Long.MAX_VALUE;
		max = Long.MIN_VALUE;
		sum = 0;
		for (int i = 0; i < n; ++i) {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		}
		out.println(min + " " + max + " " + sum);
		
		sc.close();
	}
	
	public static void main(String[] args) {
		(new Main()).run(System.in, System.out);
	}

} public class Main {

	public void run(java.io.InputStream in, java.io.PrintStream out) {
		final java.util.Scanner sc = new java.util.Scanner(in);
		long min, max, sum;
		int n;
		
		n = sc.nextInt();
		min = Long.MAX_VALUE;
		max = Long.MIN_VALUE;
		sum = 0;
		for (int i = 0; i < n; ++i) {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		}
		out.println(min + " " + max + " " + sum);
		
		sc.close();
	}
	
	public static void main(String[] args) {
		(new Main()).run(System.in, System.out);
	}

} Main
public class Main {

	public void run(java.io.InputStream in, java.io.PrintStream out) {
		final java.util.Scanner sc = new java.util.Scanner(in);
		long min, max, sum;
		int n;
		
		n = sc.nextInt();
		min = Long.MAX_VALUE;
		max = Long.MIN_VALUE;
		sum = 0;
		for (int i = 0; i < n; ++i) {
			final long a = sc.nextLong();
			
			if (a < min) min = a;
			if (max < a) max = a;
			sum += a;
		}
		out.println(min + " " + max + " " + sum);
		
		sc.close();
	}
	
	public static void main(String[] args) {
		(new Main()).run(System.in, System.out);
	}

}