import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;

public class Main {

    public static void main(String[] args) throws IOException {

        int n = 0;      //??\??????????????????2???????????´??°?????°???
        int min = 0;    //????°????
        int max = 0;    //?????§???
        double sum = 0; //????¨????

        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        }catch(IOException e) {

            //??????????????????
            System.out.println(e);

        }catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.text.DecimalFormat; DecimalFormat java.text public class Main {

    public static void main(String[] args) throws IOException {

        int n = 0;      //??\??????????????????2???????????´??°?????°???
        int min = 0;    //????°????
        int max = 0;    //?????§???
        double sum = 0; //????¨????

        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        }catch(IOException e) {

            //??????????????????
            System.out.println(e);

        }catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        }
    }
} Main public static void main(String[] args) throws IOException {

        int n = 0;      //??\??????????????????2???????????´??°?????°???
        int min = 0;    //????°????
        int max = 0;    //?????§???
        double sum = 0; //????¨????

        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        }catch(IOException e) {

            //??????????????????
            System.out.println(e);

        }catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        }
    } main {

        int n = 0;      //??\??????????????????2???????????´??°?????°???
        int min = 0;    //????°????
        int max = 0;    //?????§???
        double sum = 0; //????¨????

        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        }catch(IOException e) {

            //??????????????????
            System.out.println(e);

        }catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        }
    } int n = 0; n 0 int min = 0; min 0 int max = 0; max 0 double sum = 0; sum 0 try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        }catch(IOException e) {

            //??????????????????
            System.out.println(e);

        }catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        } catch(IOException e) {

            //??????????????????
            System.out.println(e);

        } IOException e {

            //??????????????????
            System.out.println(e);

        } System.out.println(e) System.out.println System.out System System.out e catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        } NumberFormatException e {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        } System.out.println("??°?????§??\??????????????????") System.out.println System.out System System.out "??°?????§??\??????????????????" {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String input = br.readLine(); input br.readLine() br.readLine br n = Integer.parseInt(input) n Integer.parseInt(input) Integer.parseInt Integer input input = br.readLine() input br.readLine() br.readLine br String[] strArray =input.split(" "); strArray input.split(" ") input.split input " " min = Integer.parseInt(strArray[0]) min Integer.parseInt(strArray[0]) Integer.parseInt Integer strArray[0] strArray 0 max = min max min sum += (double)min sum (double)min for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            } {

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            } int x = Integer.parseInt(strArray[i]); x Integer.parseInt(strArray[i]) Integer.parseInt Integer strArray[i] strArray i if(x < min){
                    min = x;
                } x < min x min {
                    min = x;
                } min = x min x if(max < x){
                    max = x;
                } max < x max x {
                    max = x;
                } max = x max x sum += (double)x sum (double)x DecimalFormat DF = new DecimalFormat("0"); DF new DecimalFormat("0") System.out.println(min + " " + max + " " + DF.format(sum)) System.out.println System.out System System.out min + " " + max + " " + DF.format(sum) " " max min + " " + max + " " + DF.format(sum) min " " max " " DF.format(sum) DF.format DF sum String[] args args public class Main {

    public static void main(String[] args) throws IOException {

        int n = 0;      //??\??????????????????2???????????´??°?????°???
        int min = 0;    //????°????
        int max = 0;    //?????§???
        double sum = 0; //????¨????

        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        }catch(IOException e) {

            //??????????????????
            System.out.println(e);

        }catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        }
    }
} public class Main {

    public static void main(String[] args) throws IOException {

        int n = 0;      //??\??????????????????2???????????´??°?????°???
        int min = 0;    //????°????
        int max = 0;    //?????§???
        double sum = 0; //????¨????

        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        }catch(IOException e) {

            //??????????????????
            System.out.println(e);

        }catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;

public class Main {

    public static void main(String[] args) throws IOException {

        int n = 0;      //??\??????????????????2???????????´??°?????°???
        int min = 0;    //????°????
        int max = 0;    //?????§???
        double sum = 0; //????¨????

        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input = br.readLine();

//          ??\??????1?????????2???????????´??°?????°??????????????????
            n = Integer.parseInt(input);

            input = br.readLine();
            String[] strArray =input.split(" ");

//          1???????????´??°???????°??????¨?????§????????£??\
            min = Integer.parseInt(strArray[0]);    //????°????
            max = min;   //?????§???
            sum += (double)min;  //????¨????

//          2????????\????????´??°
            for(int i = 1; i < n ; i++){

                int x = Integer.parseInt(strArray[i]);

//              1???????????´??°??¨????????????x????°?????????´??????min?????£??\
                if(x < min){
                    min = x;
                }
//              1???????????´??°??¨????????????x?????§????????´??????max?????£??\
                if(max < x){
                    max = x;
                }
//              ????¨???????x?????????
                sum += (double)x;
            }
            DecimalFormat DF = new DecimalFormat("0");

            System.out.println(min + " " + max + " " + DF.format(sum));

        }catch(IOException e) {

            //??????????????????
            System.out.println(e);

        }catch(NumberFormatException e) {

            //??°?????\????????\????????§??????
            System.out.println("??°?????§??\??????????????????");
        }
    }
}