def equilibrium_index(arr):
  
  total_sum = sum(arr)
  left_sum=0
  for i, num in enumerate(arr):
    total_sum -= num
    if left_sum == total_sum:
      return i
    left_sum += num
  return -1
def equilibrium_index(arr):
    num2 = sum(arr)
    left_sum = 0
    for i, num in enumerate(arr):
       
        num2 -= num
        if left_sum == num2:
            return i
        left_sum += num
    return -1