import java.util.Scanner;
public class Main
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
long n=sc.nextInt();
long t=sc.nextInt();
long max = t;
long min = t;
long sum = t;
for(long i=1;i<n;i++)
{
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
}
System.out.println(min+" "+max+" "+sum);
}
}
 import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
long n=sc.nextInt();
long t=sc.nextInt();
long max = t;
long min = t;
long sum = t;
for(long i=1;i<n;i++)
{
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
}
System.out.println(min+" "+max+" "+sum);
}
} Main public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
long n=sc.nextInt();
long t=sc.nextInt();
long max = t;
long min = t;
long sum = t;
for(long i=1;i<n;i++)
{
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
}
System.out.println(min+" "+max+" "+sum);
} main {
        Scanner sc = new Scanner(System.in);
long n=sc.nextInt();
long t=sc.nextInt();
long max = t;
long min = t;
long sum = t;
for(long i=1;i<n;i++)
{
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
}
System.out.println(min+" "+max+" "+sum);
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n=sc.nextInt(); n sc.nextInt() sc.nextInt sc long t=sc.nextInt(); t sc.nextInt() sc.nextInt sc long max = t; max t long min = t; min t long sum = t; sum t for(long i=1;i<n;i++)
{
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
} long i=1; long i=1; i 1 i<n i n i++ i++ i {
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
} {
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
} t=sc.nextInt() t sc.nextInt() sc.nextInt sc if(t > max) max = t ; t > max t max max = t max t if(t < min)min = t ; t < min t min min = t min t sum = sum+=t sum sum+=t sum t 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[])
    {
        Scanner sc = new Scanner(System.in);
long n=sc.nextInt();
long t=sc.nextInt();
long max = t;
long min = t;
long sum = t;
for(long i=1;i<n;i++)
{
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
}
System.out.println(min+" "+max+" "+sum);
}
} public class Main
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
long n=sc.nextInt();
long t=sc.nextInt();
long max = t;
long min = t;
long sum = t;
for(long i=1;i<n;i++)
{
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
}
System.out.println(min+" "+max+" "+sum);
}
} Main
import java.util.Scanner;
public class Main
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
long n=sc.nextInt();
long t=sc.nextInt();
long max = t;
long min = t;
long sum = t;
for(long i=1;i<n;i++)
{
t=sc.nextInt();
if(t > max) max = t ;
if(t < min)min = t ;
sum = sum+=t;
}
System.out.println(min+" "+max+" "+sum);
}
}

