import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int b=scan.nextInt();
long min=1000000,max=-10000000,sum=0;
for(int a=0;a<b;a++){
int c=scan.nextInt();
if(min>c)
min=c;
if(max<c)
max=c;
sum=sum+c;
}
System.out.println(min+" "+max+" "+sum);
}
} import java.util.Scanner; Scanner java.util class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int b=scan.nextInt();
long min=1000000,max=-10000000,sum=0;
for(int a=0;a<b;a++){
int c=scan.nextInt();
if(min>c)
min=c;
if(max<c)
max=c;
sum=sum+c;
}
System.out.println(min+" "+max+" "+sum);
}
} Main public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int b=scan.nextInt();
long min=1000000,max=-10000000,sum=0;
for(int a=0;a<b;a++){
int c=scan.nextInt();
if(min>c)
min=c;
if(max<c)
max=c;
sum=sum+c;
}
System.out.println(min+" "+max+" "+sum);
} main {
Scanner scan=new Scanner(System.in);
int b=scan.nextInt();
long min=1000000,max=-10000000,sum=0;
for(int a=0;a<b;a++){
int c=scan.nextInt();
if(min>c)
min=c;
if(max<c)
max=c;
sum=sum+c;
}
System.out.println(min+" "+max+" "+sum);
} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int b=scan.nextInt(); b scan.nextInt() scan.nextInt scan long min=1000000 min 1000000 max=-10000000 max -10000000 10000000 sum=0; sum 0 for(int a=0;a<b;a++){
int c=scan.nextInt();
if(min>c)
min=c;
if(max<c)
max=c;
sum=sum+c;
} int a=0; int a=0; a 0 a<b a b a++ a++ a {
int c=scan.nextInt();
if(min>c)
min=c;
if(max<c)
max=c;
sum=sum+c;
} {
int c=scan.nextInt();
if(min>c)
min=c;
if(max<c)
max=c;
sum=sum+c;
} int c=scan.nextInt(); c scan.nextInt() scan.nextInt scan if(min>c)
min=c; min>c min c min=c min c if(max<c)
max=c; max<c max c max=c max c sum=sum+c sum sum+c sum c 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
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int b=scan.nextInt();
long min=1000000,max=-10000000,sum=0;
for(int a=0;a<b;a++){
int c=scan.nextInt();
if(min>c)
min=c;
if(max<c)
max=c;
sum=sum+c;
}
System.out.println(min+" "+max+" "+sum);
}
}