import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();

		int[] ary = new int[n];

		for(int i = 0; i < n; i++){

			ary[i] = scan.nextInt();
		}

		scan.close();

		int intMax = ary[0];
		//?????§?????????
		for(int i = 0; i < ary.length; i++){

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		}


		int intMin = ary[0];
		//????°??????????
		for(int i = 0; i < ary.length; i++){

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		}

		long dbSum = 0;
		//????¨???????
		for(int i = 0; i < ary.length; i++){

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		}


		System.out.println(intMin + " " + intMax + " " + dbSum);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();

		int[] ary = new int[n];

		for(int i = 0; i < n; i++){

			ary[i] = scan.nextInt();
		}

		scan.close();

		int intMax = ary[0];
		//?????§?????????
		for(int i = 0; i < ary.length; i++){

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		}


		int intMin = ary[0];
		//????°??????????
		for(int i = 0; i < ary.length; i++){

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		}

		long dbSum = 0;
		//????¨???????
		for(int i = 0; i < ary.length; i++){

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		}


		System.out.println(intMin + " " + intMax + " " + dbSum);
	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();

		int[] ary = new int[n];

		for(int i = 0; i < n; i++){

			ary[i] = scan.nextInt();
		}

		scan.close();

		int intMax = ary[0];
		//?????§?????????
		for(int i = 0; i < ary.length; i++){

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		}


		int intMin = ary[0];
		//????°??????????
		for(int i = 0; i < ary.length; i++){

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		}

		long dbSum = 0;
		//????¨???????
		for(int i = 0; i < ary.length; i++){

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		}


		System.out.println(intMin + " " + intMax + " " + dbSum);
	} main {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();

		int[] ary = new int[n];

		for(int i = 0; i < n; i++){

			ary[i] = scan.nextInt();
		}

		scan.close();

		int intMax = ary[0];
		//?????§?????????
		for(int i = 0; i < ary.length; i++){

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		}


		int intMin = ary[0];
		//????°??????????
		for(int i = 0; i < ary.length; i++){

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		}

		long dbSum = 0;
		//????¨???????
		for(int i = 0; i < ary.length; i++){

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		}


		System.out.println(intMin + " " + intMax + " " + dbSum);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] ary = new int[n]; ary new int[n] n for(int i = 0; i < n; i++){

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

			ary[i] = scan.nextInt();
		} {

			ary[i] = scan.nextInt();
		} ary[i] = scan.nextInt() ary[i] ary i scan.nextInt() scan.nextInt scan scan.close() scan.close scan int intMax = ary[0]; intMax ary[0] ary 0 for(int i = 0; i < ary.length; i++){

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		} int i = 0; int i = 0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		} {

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		} if(intMax < ary[i]){

				intMax = ary[i];
			} intMax < ary[i] intMax ary[i] ary i {

				intMax = ary[i];
			} intMax = ary[i] intMax ary[i] ary i int intMin = ary[0]; intMin ary[0] ary 0 for(int i = 0; i < ary.length; i++){

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		} int i = 0; int i = 0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		} {

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		} if(intMin > ary[i]){

				intMin = ary[i];
			} intMin > ary[i] intMin ary[i] ary i {

				intMin = ary[i];
			} intMin = ary[i] intMin ary[i] ary i long dbSum = 0; dbSum 0 for(int i = 0; i < ary.length; i++){

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		} int i = 0; int i = 0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		} {

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		} dbSum = dbSum + ary[i] dbSum dbSum + ary[i] dbSum ary[i] ary i System.out.println(intMin + " " + intMax + " " + dbSum) System.out.println System.out System System.out intMin + " " + intMax + " " + dbSum " " intMax intMin + " " + intMax + " " + dbSum intMin " " intMax " " dbSum String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();

		int[] ary = new int[n];

		for(int i = 0; i < n; i++){

			ary[i] = scan.nextInt();
		}

		scan.close();

		int intMax = ary[0];
		//?????§?????????
		for(int i = 0; i < ary.length; i++){

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		}


		int intMin = ary[0];
		//????°??????????
		for(int i = 0; i < ary.length; i++){

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		}

		long dbSum = 0;
		//????¨???????
		for(int i = 0; i < ary.length; i++){

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		}


		System.out.println(intMin + " " + intMax + " " + dbSum);
	}
} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();

		int[] ary = new int[n];

		for(int i = 0; i < n; i++){

			ary[i] = scan.nextInt();
		}

		scan.close();

		int intMax = ary[0];
		//?????§?????????
		for(int i = 0; i < ary.length; i++){

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		}


		int intMin = ary[0];
		//????°??????????
		for(int i = 0; i < ary.length; i++){

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		}

		long dbSum = 0;
		//????¨???????
		for(int i = 0; i < ary.length; i++){

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		}


		System.out.println(intMin + " " + intMax + " " + dbSum);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????


		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();

		int[] ary = new int[n];

		for(int i = 0; i < n; i++){

			ary[i] = scan.nextInt();
		}

		scan.close();

		int intMax = ary[0];
		//?????§?????????
		for(int i = 0; i < ary.length; i++){

			if(intMax < ary[i]){

				intMax = ary[i];
			}
		}


		int intMin = ary[0];
		//????°??????????
		for(int i = 0; i < ary.length; i++){

			if(intMin > ary[i]){

				intMin = ary[i];
			}
		}

		long dbSum = 0;
		//????¨???????
		for(int i = 0; i < ary.length; i++){

			dbSum = dbSum + ary[i];

			//System.out.println("[" + i + "]" + "intSum: " + intSum + " ary:" + ary[i]);
		}


		System.out.println(intMin + " " + intMax + " " + dbSum);
	}
}