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

