def main(): d = int(input()) print(min(map(int, input().split()))*d) if __name__ == '__main__': main()