import java.util.Scanner;


class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner( System.in);	
		double a[]=new double[10001];
		double min=1000000,max=-1000000,sum=0;
		int i=0;
		
		int n = kb.nextInt();
		while( 0<n-- ) {
			a[i]=kb.nextDouble();
			sum+=a[i];
			if( a[i] <= min ) {
				min=a[i];
			} 
			if( max <= a[i]  ) {
				max=a[i];
			} 
		}
		
		System.out.printf( "%.0f %.0f %.0f\n", min, max, sum );
		
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner( System.in);	
		double a[]=new double[10001];
		double min=1000000,max=-1000000,sum=0;
		int i=0;
		
		int n = kb.nextInt();
		while( 0<n-- ) {
			a[i]=kb.nextDouble();
			sum+=a[i];
			if( a[i] <= min ) {
				min=a[i];
			} 
			if( max <= a[i]  ) {
				max=a[i];
			} 
		}
		
		System.out.printf( "%.0f %.0f %.0f\n", min, max, sum );
		
	}
} Main public static void main(String[] args) {
		Scanner kb = new Scanner( System.in);	
		double a[]=new double[10001];
		double min=1000000,max=-1000000,sum=0;
		int i=0;
		
		int n = kb.nextInt();
		while( 0<n-- ) {
			a[i]=kb.nextDouble();
			sum+=a[i];
			if( a[i] <= min ) {
				min=a[i];
			} 
			if( max <= a[i]  ) {
				max=a[i];
			} 
		}
		
		System.out.printf( "%.0f %.0f %.0f\n", min, max, sum );
		
	} main {
		Scanner kb = new Scanner( System.in);	
		double a[]=new double[10001];
		double min=1000000,max=-1000000,sum=0;
		int i=0;
		
		int n = kb.nextInt();
		while( 0<n-- ) {
			a[i]=kb.nextDouble();
			sum+=a[i];
			if( a[i] <= min ) {
				min=a[i];
			} 
			if( max <= a[i]  ) {
				max=a[i];
			} 
		}
		
		System.out.printf( "%.0f %.0f %.0f\n", min, max, sum );
		
	} Scanner kb = new Scanner( System.in); kb new Scanner( System.in) double a[]=new double[10001]; a new double[10001] 10001 double min=1000000 min 1000000 max=-1000000 max -1000000 1000000 sum=0; sum 0 int i=0; i 0 int n = kb.nextInt(); n kb.nextInt() kb.nextInt kb while( 0<n-- ) {
			a[i]=kb.nextDouble();
			sum+=a[i];
			if( a[i] <= min ) {
				min=a[i];
			} 
			if( max <= a[i]  ) {
				max=a[i];
			} 
		} 0<n-- 0 n-- n {
			a[i]=kb.nextDouble();
			sum+=a[i];
			if( a[i] <= min ) {
				min=a[i];
			} 
			if( max <= a[i]  ) {
				max=a[i];
			} 
		} a[i]=kb.nextDouble() a[i] a i kb.nextDouble() kb.nextDouble kb sum+=a[i] sum a[i] a i if( a[i] <= min ) {
				min=a[i];
			} a[i] <= min a[i] a i min {
				min=a[i];
			} min=a[i] min a[i] a i if( max <= a[i]  ) {
				max=a[i];
			} max <= a[i] max a[i] a i {
				max=a[i];
			} max=a[i] max a[i] a i System.out.printf( "%.0f %.0f %.0f\n", min, max, sum ) System.out.printf System.out System System.out "%.0f %.0f %.0f\n" min max sum String[] args args
import java.util.Scanner;


class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner( System.in);	
		double a[]=new double[10001];
		double min=1000000,max=-1000000,sum=0;
		int i=0;
		
		int n = kb.nextInt();
		while( 0<n-- ) {
			a[i]=kb.nextDouble();
			sum+=a[i];
			if( a[i] <= min ) {
				min=a[i];
			} 
			if( max <= a[i]  ) {
				max=a[i];
			} 
		}
		
		System.out.printf( "%.0f %.0f %.0f\n", min, max, sum );
		
	}
}