import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {

		long max = Integer.MIN_VALUE;
		long min = Integer.MAX_VALUE;
		long sum = 0;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(br.readLine());
		String[] inputArray = br.readLine().split(" ");

		long input = 0;
		for (int i=0; i<N; i++) {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		}

		System.out.println(min +" "+ max +" "+ sum);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {

		long max = Integer.MIN_VALUE;
		long min = Integer.MAX_VALUE;
		long sum = 0;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(br.readLine());
		String[] inputArray = br.readLine().split(" ");

		long input = 0;
		for (int i=0; i<N; i++) {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		}

		System.out.println(min +" "+ max +" "+ sum);
	}
} Main public static void main(String[] args) throws IOException {

		long max = Integer.MIN_VALUE;
		long min = Integer.MAX_VALUE;
		long sum = 0;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(br.readLine());
		String[] inputArray = br.readLine().split(" ");

		long input = 0;
		for (int i=0; i<N; i++) {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		}

		System.out.println(min +" "+ max +" "+ sum);
	} main {

		long max = Integer.MIN_VALUE;
		long min = Integer.MAX_VALUE;
		long sum = 0;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(br.readLine());
		String[] inputArray = br.readLine().split(" ");

		long input = 0;
		for (int i=0; i<N; i++) {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		}

		System.out.println(min +" "+ max +" "+ sum);
	} long max = Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE long min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE long sum = 0; sum 0 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int N = Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] inputArray = br.readLine().split(" "); inputArray br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long input = 0; input 0 for (int i=0; i<N; i++) {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		} {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		} input = Long.parseLong(inputArray[i]) input Long.parseLong(inputArray[i]) Long.parseLong Long inputArray[i] inputArray i if (max < input) {
				max = input;
			} max < input max input {
				max = input;
			} max = input max input if (min > input) {
				min = input;
			} min > input min input {
				min = input;
			} min = input min input sum += input sum input 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) throws IOException {

		long max = Integer.MIN_VALUE;
		long min = Integer.MAX_VALUE;
		long sum = 0;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(br.readLine());
		String[] inputArray = br.readLine().split(" ");

		long input = 0;
		for (int i=0; i<N; i++) {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		}

		System.out.println(min +" "+ max +" "+ sum);
	}
} public class Main {

	public static void main(String[] args) throws IOException {

		long max = Integer.MIN_VALUE;
		long min = Integer.MAX_VALUE;
		long sum = 0;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(br.readLine());
		String[] inputArray = br.readLine().split(" ");

		long input = 0;
		for (int i=0; i<N; i++) {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		}

		System.out.println(min +" "+ max +" "+ sum);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {

		long max = Integer.MIN_VALUE;
		long min = Integer.MAX_VALUE;
		long sum = 0;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(br.readLine());
		String[] inputArray = br.readLine().split(" ");

		long input = 0;
		for (int i=0; i<N; i++) {
			input = Long.parseLong(inputArray[i]);
			if (max < input) {
				max = input;
			}

			if (min > input) {
				min = input;
			}

			sum += input;
		}

		System.out.println(min +" "+ max +" "+ sum);
	}
}