let content = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', buf => {
  content += buf;
});
process.stdin.on('end', () => {
  const [, line] = content
    .trim()
    .split('\n');
  const nums = line.split(' ').map(n => parseInt(n, 10));
  const max = Math.max(...nums);
  const min = Math.min(...nums);
  const sum = nums.reduce((prev, cur) => prev + cur);
  console.log(min, max, sum);
});

