import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigDecimal;

public class Main {
	public static void main(String[] args) throws Exception {
		int eNum;//????????????????´???°????´???¨

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String str = br.readLine();//????????????????´???°???????´?
		eNum = Integer.parseInt(str);

		String[] element = new String[eNum];

		str = br.readLine();
		element = getElement(str);//????????????????´????????´?

		System.out.println(getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum));
	}

	//?????§???????±???????????????????
	public static int getMax(String[] element, int num) {
		int max = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			max = Math.max(max, Integer.parseInt(element[i]));
		}
		return (max);
	}

	//????°????????±???????????????????
	public static int getMin(String[] element, int num) {
		int min = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			min = Math.min(min, Integer.parseInt(element[i]));
		}
		return (min);
	}

	//????¨?????±???????????????????
	public static BigDecimal getSum(String[] element, int num) {
		BigDecimal sum = new BigDecimal("0");

		for (int i = 0; i < num; i++) {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		}
		return (sum);
	}

	//??????????????????????????????????????????
	public static String[] getElement(String element) {
		return (element.split(" "));
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.math.BigDecimal; BigDecimal java.math public class Main {
	public static void main(String[] args) throws Exception {
		int eNum;//????????????????´???°????´???¨

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String str = br.readLine();//????????????????´???°???????´?
		eNum = Integer.parseInt(str);

		String[] element = new String[eNum];

		str = br.readLine();
		element = getElement(str);//????????????????´????????´?

		System.out.println(getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum));
	}

	//?????§???????±???????????????????
	public static int getMax(String[] element, int num) {
		int max = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			max = Math.max(max, Integer.parseInt(element[i]));
		}
		return (max);
	}

	//????°????????±???????????????????
	public static int getMin(String[] element, int num) {
		int min = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			min = Math.min(min, Integer.parseInt(element[i]));
		}
		return (min);
	}

	//????¨?????±???????????????????
	public static BigDecimal getSum(String[] element, int num) {
		BigDecimal sum = new BigDecimal("0");

		for (int i = 0; i < num; i++) {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		}
		return (sum);
	}

	//??????????????????????????????????????????
	public static String[] getElement(String element) {
		return (element.split(" "));
	}

} Main public static void main(String[] args) throws Exception {
		int eNum;//????????????????´???°????´???¨

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String str = br.readLine();//????????????????´???°???????´?
		eNum = Integer.parseInt(str);

		String[] element = new String[eNum];

		str = br.readLine();
		element = getElement(str);//????????????????´????????´?

		System.out.println(getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum));
	} main {
		int eNum;//????????????????´???°????´???¨

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String str = br.readLine();//????????????????´???°???????´?
		eNum = Integer.parseInt(str);

		String[] element = new String[eNum];

		str = br.readLine();
		element = getElement(str);//????????????????´????????´?

		System.out.println(getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum));
	} int eNum; eNum InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String str = br.readLine(); str br.readLine() br.readLine br eNum = Integer.parseInt(str) eNum Integer.parseInt(str) Integer.parseInt Integer str String[] element = new String[eNum]; element new String[eNum] eNum str = br.readLine() str br.readLine() br.readLine br element = getElement(str) element getElement(str) getElement str System.out.println(getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum)) System.out.println System.out System System.out getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum) " " getMax(element, eNum) getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum) getMin(element, eNum) getMin element eNum " " getMax(element, eNum) getMax element eNum " " getSum(element, eNum) getSum element eNum String[] args args //?????§???????±???????????????????
	public static int getMax(String[] element, int num) {
		int max = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			max = Math.max(max, Integer.parseInt(element[i]));
		}
		return (max);
	} getMax {
		int max = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			max = Math.max(max, Integer.parseInt(element[i]));
		}
		return (max);
	} int max = Integer.parseInt(element[0]); max Integer.parseInt(element[0]) Integer.parseInt Integer element[0] element 0 for (int i = 0; i < num; i++) {
			max = Math.max(max, Integer.parseInt(element[i]));
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
			max = Math.max(max, Integer.parseInt(element[i]));
		} {
			max = Math.max(max, Integer.parseInt(element[i]));
		} max = Math.max(max, Integer.parseInt(element[i])) max Math.max(max, Integer.parseInt(element[i])) Math.max Math max Integer.parseInt(element[i]) Integer.parseInt Integer element[i] element i return (max); (max) String[] element element int num num //????°????????±???????????????????
	public static int getMin(String[] element, int num) {
		int min = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			min = Math.min(min, Integer.parseInt(element[i]));
		}
		return (min);
	} getMin {
		int min = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			min = Math.min(min, Integer.parseInt(element[i]));
		}
		return (min);
	} int min = Integer.parseInt(element[0]); min Integer.parseInt(element[0]) Integer.parseInt Integer element[0] element 0 for (int i = 0; i < num; i++) {
			min = Math.min(min, Integer.parseInt(element[i]));
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
			min = Math.min(min, Integer.parseInt(element[i]));
		} {
			min = Math.min(min, Integer.parseInt(element[i]));
		} min = Math.min(min, Integer.parseInt(element[i])) min Math.min(min, Integer.parseInt(element[i])) Math.min Math min Integer.parseInt(element[i]) Integer.parseInt Integer element[i] element i return (min); (min) String[] element element int num num //????¨?????±???????????????????
	public static BigDecimal getSum(String[] element, int num) {
		BigDecimal sum = new BigDecimal("0");

		for (int i = 0; i < num; i++) {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		}
		return (sum);
	} getSum {
		BigDecimal sum = new BigDecimal("0");

		for (int i = 0; i < num; i++) {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		}
		return (sum);
	} BigDecimal sum = new BigDecimal("0"); sum new BigDecimal("0") for (int i = 0; i < num; i++) {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		} {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		} sum = sum.add(new BigDecimal(element[i])) sum sum.add(new BigDecimal(element[i])) sum.add sum new BigDecimal(element[i]) return (sum); (sum) String[] element element int num num //??????????????????????????????????????????
	public static String[] getElement(String element) {
		return (element.split(" "));
	} getElement {
		return (element.split(" "));
	} return (element.split(" ")); (element.split(" ")) element.split element " " String element element public class Main {
	public static void main(String[] args) throws Exception {
		int eNum;//????????????????´???°????´???¨

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String str = br.readLine();//????????????????´???°???????´?
		eNum = Integer.parseInt(str);

		String[] element = new String[eNum];

		str = br.readLine();
		element = getElement(str);//????????????????´????????´?

		System.out.println(getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum));
	}

	//?????§???????±???????????????????
	public static int getMax(String[] element, int num) {
		int max = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			max = Math.max(max, Integer.parseInt(element[i]));
		}
		return (max);
	}

	//????°????????±???????????????????
	public static int getMin(String[] element, int num) {
		int min = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			min = Math.min(min, Integer.parseInt(element[i]));
		}
		return (min);
	}

	//????¨?????±???????????????????
	public static BigDecimal getSum(String[] element, int num) {
		BigDecimal sum = new BigDecimal("0");

		for (int i = 0; i < num; i++) {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		}
		return (sum);
	}

	//??????????????????????????????????????????
	public static String[] getElement(String element) {
		return (element.split(" "));
	}

} public class Main {
	public static void main(String[] args) throws Exception {
		int eNum;//????????????????´???°????´???¨

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String str = br.readLine();//????????????????´???°???????´?
		eNum = Integer.parseInt(str);

		String[] element = new String[eNum];

		str = br.readLine();
		element = getElement(str);//????????????????´????????´?

		System.out.println(getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum));
	}

	//?????§???????±???????????????????
	public static int getMax(String[] element, int num) {
		int max = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			max = Math.max(max, Integer.parseInt(element[i]));
		}
		return (max);
	}

	//????°????????±???????????????????
	public static int getMin(String[] element, int num) {
		int min = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			min = Math.min(min, Integer.parseInt(element[i]));
		}
		return (min);
	}

	//????¨?????±???????????????????
	public static BigDecimal getSum(String[] element, int num) {
		BigDecimal sum = new BigDecimal("0");

		for (int i = 0; i < num; i++) {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		}
		return (sum);
	}

	//??????????????????????????????????????????
	public static String[] getElement(String element) {
		return (element.split(" "));
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigDecimal;

public class Main {
	public static void main(String[] args) throws Exception {
		int eNum;//????????????????´???°????´???¨

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String str = br.readLine();//????????????????´???°???????´?
		eNum = Integer.parseInt(str);

		String[] element = new String[eNum];

		str = br.readLine();
		element = getElement(str);//????????????????´????????´?

		System.out.println(getMin(element, eNum) + " " +
				getMax(element, eNum) + " " + getSum(element, eNum));
	}

	//?????§???????±???????????????????
	public static int getMax(String[] element, int num) {
		int max = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			max = Math.max(max, Integer.parseInt(element[i]));
		}
		return (max);
	}

	//????°????????±???????????????????
	public static int getMin(String[] element, int num) {
		int min = Integer.parseInt(element[0]);
		for (int i = 0; i < num; i++) {
			min = Math.min(min, Integer.parseInt(element[i]));
		}
		return (min);
	}

	//????¨?????±???????????????????
	public static BigDecimal getSum(String[] element, int num) {
		BigDecimal sum = new BigDecimal("0");

		for (int i = 0; i < num; i++) {
			sum = sum.add(new BigDecimal(element[i]));
//			System.out.println("i="+i+" "+element[i]);
		}
		return (sum);
	}

	//??????????????????????????????????????????
	public static String[] getElement(String element) {
		return (element.split(" "));
	}

}