
def find_a_seat(n, lst):
  try:
    return next(i for i,l in enumerate(lst) if l <= (n/(len(lst)))/2) 
  except:
    return -1


be9309f051c61cf0c0df1337ddbaa43950cd96f0
<mask token>

def find_a_seat(n, lst):
    try:
        return next(i for i, l in enumerate(lst) if l <= n / len(lst) / 2)
    except:
        return -1


def find_a_seat(n, lst):
  try:
    return next(i for i,l in enumerate(lst) if l <= (n/(len(lst)))/2) 
  except:
    return -1

