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