import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        long sum = 0;
        ArrayList<Integer> ali = new ArrayList<>();
        for(int a = scn.nextInt(); scn.hasNext(); sum += a) {
            a = scn.nextInt();
            ali.add(a);
        }
        Collections.sort(ali);
        System.out.println(
          ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum
        );
    }
} import java.util.*; util.* java public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        long sum = 0;
        ArrayList<Integer> ali = new ArrayList<>();
        for(int a = scn.nextInt(); scn.hasNext(); sum += a) {
            a = scn.nextInt();
            ali.add(a);
        }
        Collections.sort(ali);
        System.out.println(
          ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum
        );
    }
} Main private static final Scanner scn = new Scanner(System.in); scn new Scanner(System.in) public static void main(String[] args) {
        long sum = 0;
        ArrayList<Integer> ali = new ArrayList<>();
        for(int a = scn.nextInt(); scn.hasNext(); sum += a) {
            a = scn.nextInt();
            ali.add(a);
        }
        Collections.sort(ali);
        System.out.println(
          ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum
        );
    } main {
        long sum = 0;
        ArrayList<Integer> ali = new ArrayList<>();
        for(int a = scn.nextInt(); scn.hasNext(); sum += a) {
            a = scn.nextInt();
            ali.add(a);
        }
        Collections.sort(ali);
        System.out.println(
          ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum
        );
    } long sum = 0; sum 0 ArrayList<Integer> ali = new ArrayList<>(); ali new ArrayList<>() for(int a = scn.nextInt(); scn.hasNext(); sum += a) {
            a = scn.nextInt();
            ali.add(a);
        } int a = scn.nextInt(); int a = scn.nextInt(); a scn.nextInt() scn.nextInt scn scn.hasNext() scn.hasNext scn sum += a sum += a sum a {
            a = scn.nextInt();
            ali.add(a);
        } {
            a = scn.nextInt();
            ali.add(a);
        } a = scn.nextInt() a scn.nextInt() scn.nextInt scn ali.add(a) ali.add ali a Collections.sort(ali) Collections.sort Collections ali System.out.println(
          ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum
        ) System.out.println System.out System System.out ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum " " ali.get(ali.size() - 1) ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum ali.get(0) ali.get ali 0 " " ali.get(ali.size() - 1) ali.get ali ali.size() - 1 ali.size() ali.size ali 1 " " sum String[] args args public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        long sum = 0;
        ArrayList<Integer> ali = new ArrayList<>();
        for(int a = scn.nextInt(); scn.hasNext(); sum += a) {
            a = scn.nextInt();
            ali.add(a);
        }
        Collections.sort(ali);
        System.out.println(
          ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum
        );
    }
} public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        long sum = 0;
        ArrayList<Integer> ali = new ArrayList<>();
        for(int a = scn.nextInt(); scn.hasNext(); sum += a) {
            a = scn.nextInt();
            ali.add(a);
        }
        Collections.sort(ali);
        System.out.println(
          ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum
        );
    }
} Main
import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        long sum = 0;
        ArrayList<Integer> ali = new ArrayList<>();
        for(int a = scn.nextInt(); scn.hasNext(); sum += a) {
            a = scn.nextInt();
            ali.add(a);
        }
        Collections.sort(ali);
        System.out.println(
          ali.get(0) + " " + ali.get(ali.size() - 1) + " " + sum
        );
    }
}