#!/usr/bin/env python3
n = input()
a = list(map(int, input().split()))
print(min(a) + min(a))
