public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		//StringBuilder sb = new StringBuilder();

		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0;i < n;i++) {
			a[i] = sc.nextInt();
		}

		int mini = a[0];
		for (int i:a) { mini = Math.min(mini, i);}

		int maxi = a[0];
		for (int i:a) { maxi = Math.max(maxi, i);}

		long goukei = 0;
		for (int i:a) { goukei = goukei + i;}

		System.out.println(mini + " " + maxi + " " + goukei);
	}
} public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		//StringBuilder sb = new StringBuilder();

		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0;i < n;i++) {
			a[i] = sc.nextInt();
		}

		int mini = a[0];
		for (int i:a) { mini = Math.min(mini, i);}

		int maxi = a[0];
		for (int i:a) { maxi = Math.max(maxi, i);}

		long goukei = 0;
		for (int i:a) { goukei = goukei + i;}

		System.out.println(mini + " " + maxi + " " + goukei);
	}
} Main public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		//StringBuilder sb = new StringBuilder();

		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0;i < n;i++) {
			a[i] = sc.nextInt();
		}

		int mini = a[0];
		for (int i:a) { mini = Math.min(mini, i);}

		int maxi = a[0];
		for (int i:a) { maxi = Math.max(maxi, i);}

		long goukei = 0;
		for (int i:a) { goukei = goukei + i;}

		System.out.println(mini + " " + maxi + " " + goukei);
	} main {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		//StringBuilder sb = new StringBuilder();

		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0;i < n;i++) {
			a[i] = sc.nextInt();
		}

		int mini = a[0];
		for (int i:a) { mini = Math.min(mini, i);}

		int maxi = a[0];
		for (int i:a) { maxi = Math.max(maxi, i);}

		long goukei = 0;
		for (int i:a) { goukei = goukei + i;}

		System.out.println(mini + " " + maxi + " " + goukei);
	} java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n for (int i = 0;i < n;i++) {
			a[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[i] = sc.nextInt();
		} {
			a[i] = sc.nextInt();
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int mini = a[0]; mini a[0] a 0 for (int i:a) { mini = Math.min(mini, i);} int i a { mini = Math.min(mini, i);} { mini = Math.min(mini, i);} mini = Math.min(mini, i) mini Math.min(mini, i) Math.min Math mini i int maxi = a[0]; maxi a[0] a 0 for (int i:a) { maxi = Math.max(maxi, i);} int i a { maxi = Math.max(maxi, i);} { maxi = Math.max(maxi, i);} maxi = Math.max(maxi, i) maxi Math.max(maxi, i) Math.max Math maxi i long goukei = 0; goukei 0 for (int i:a) { goukei = goukei + i;} int i a { goukei = goukei + i;} { goukei = goukei + i;} goukei = goukei + i goukei goukei + i goukei i System.out.println(mini + " " + maxi + " " + goukei) System.out.println System.out System System.out mini + " " + maxi + " " + goukei " " maxi mini + " " + maxi + " " + goukei mini " " maxi " " goukei String[] args args public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		//StringBuilder sb = new StringBuilder();

		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0;i < n;i++) {
			a[i] = sc.nextInt();
		}

		int mini = a[0];
		for (int i:a) { mini = Math.min(mini, i);}

		int maxi = a[0];
		for (int i:a) { maxi = Math.max(maxi, i);}

		long goukei = 0;
		for (int i:a) { goukei = goukei + i;}

		System.out.println(mini + " " + maxi + " " + goukei);
	}
} public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		//StringBuilder sb = new StringBuilder();

		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0;i < n;i++) {
			a[i] = sc.nextInt();
		}

		int mini = a[0];
		for (int i:a) { mini = Math.min(mini, i);}

		int maxi = a[0];
		for (int i:a) { maxi = Math.max(maxi, i);}

		long goukei = 0;
		for (int i:a) { goukei = goukei + i;}

		System.out.println(mini + " " + maxi + " " + goukei);
	}
} Main
public class Main {
	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		//StringBuilder sb = new StringBuilder();

		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0;i < n;i++) {
			a[i] = sc.nextInt();
		}

		int mini = a[0];
		for (int i:a) { mini = Math.min(mini, i);}

		int maxi = a[0];
		for (int i:a) { maxi = Math.max(maxi, i);}

		long goukei = 0;
		for (int i:a) { goukei = goukei + i;}

		System.out.println(mini + " " + maxi + " " + goukei);
	}
}