
# coding: utf-8

# In[ ]:

n = [int(i)for i in input().split()]
n = list(map(int, n))
while sum(n)!=0:
    continue
else:
    n = list(map(int, n))
    for i in n:
        while i != 0:
            x = i + x
            if (x == 0):
                print(x ** 2)
            if i == 0:
                continue

    


# In[ ]:

n = int(input())

while n != 0:
    n += n 
    n = int(input())
    
    continue
else:
    print(n ** 2)


# In[ ]:

1
-3
5
-6
-10
13
4
-8


# In[ ]:

m = int(input())
d = 0
while m != 0:
    s = int(input())
    d = 's' + 'm'
    m += s
    continue
else:
    print(m ** 2)
    
    


# In[ ]:

o =[]
f=0
st =0
su =0
while True == True:
    b = int(input())
    o.append(b)
    f+=b
    if f==0:
        for i in range(len(o)):
            ma =o[st]* o[st]
            su+= ma
            st+= 1
        print(su)
        
            


# In[1]:

y=0
s=0
q=0
while True:
    a=int(input())
    if q==0:
        s+=a
        y+=a**2
    if s==0:
        break
    if a==0:
        break
print(y)


# In[ ]:



