def max_area(hs):
    """
    Find the maximum area between 2 poles whose heights are given in
    the list hs.
    """
    i = 0
    j = len(hs)-1
    amax = (j-i) * min(hs[j], hs[i])

    while j-i > 1:
        if hs[i] <= hs[j]:
            i+=1
        else:
            j-=1
        a = (j-i) * min(hs[j], hs[i])
        if a > amax:
            amax = a

    return amax