import java.io.IOException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long [] ax = new long [n];
		
		long max =0;
		long min =0;
		long sum =0;
		
		int i = 0;
		while(i<n){
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		}
		
		System.out.println(min+" "+max+" "+sum);
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long [] ax = new long [n];
		
		long max =0;
		long min =0;
		long sum =0;
		
		int i = 0;
		while(i<n){
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		}
		
		System.out.println(min+" "+max+" "+sum);
	}
} Main public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long [] ax = new long [n];
		
		long max =0;
		long min =0;
		long sum =0;
		
		int i = 0;
		while(i<n){
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		}
		
		System.out.println(min+" "+max+" "+sum);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long [] ax = new long [n];
		
		long max =0;
		long min =0;
		long sum =0;
		
		int i = 0;
		while(i<n){
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		}
		
		System.out.println(min+" "+max+" "+sum);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long [] ax = new long [n]; ax new long [n] n long max =0; max 0 long min =0; min 0 long sum =0; sum 0 int i = 0; i 0 while(i<n){
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		} i<n i n {
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		} ax[i] = sc.nextLong() ax[i] ax i sc.nextLong() sc.nextLong sc if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			} i==0 i 0 {
				max = ax[0];
				min = ax[0];
			} max = ax[0] max ax[0] ax 0 min = ax[0] min ax[0] ax 0 {
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			} if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				} max < ax[i] max ax[i] ax i {
					max = ax[i];
				} max = ax[i] max ax[i] ax i if(min > ax[i]){
					min = ax[i];
				} min > ax[i] min ax[i] ax i {
					min = ax[i];
				} min = ax[i] min ax[i] ax i sum += ax[i] sum ax[i] ax i i++ i 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{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long [] ax = new long [n];
		
		long max =0;
		long min =0;
		long sum =0;
		
		int i = 0;
		while(i<n){
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		}
		
		System.out.println(min+" "+max+" "+sum);
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long [] ax = new long [n];
		
		long max =0;
		long min =0;
		long sum =0;
		
		int i = 0;
		while(i<n){
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		}
		
		System.out.println(min+" "+max+" "+sum);
	}
} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long [] ax = new long [n];
		
		long max =0;
		long min =0;
		long sum =0;
		
		int i = 0;
		while(i<n){
			ax[i] = sc.nextLong();
			if(i==0){
				max = ax[0];
				min = ax[0];
			}
			else{
				if(max < ax[i]){
					max = ax[i];
				}
				else if(min > ax[i]){
					min = ax[i];
				}
			}
			sum += ax[i];
			i++;
		}
		
		System.out.println(min+" "+max+" "+sum);
	}
}