n = input()s = input().split(" ")s = list(map(int,s))print(max(s))because the time complexity of max() is O(n) while list.sort() is n log (n) (timsort)more about complexcity:
Furthermore,you have to use map() to let every object in the list from str to int,or you may get the wrong result.compiler will choose the biggiest first digit.
for instance,44 and 110
type(str): 110 < 44
type(int): 44 < 110