import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.range;
import std.container;
import std.bigint;
import std.math;

void main()
{
	readln;
	auto x = readln.chomp.split.map!(to!long).array;
	writeln(x.reduce!(min), " ", x.reduce!(max), " ", x.reduce!("a+b"));
}