There are five people playing a game called "Generosity". Each person gives some non-zero number of coins b as an initial bet. After all players make their bets of b coins, the following operation is repeated for several times: a coin is passed from one player to some other player.

Your task is to write a program that can, given the number of coins each player has at the end of the game, determine the size b of the initial bet or find out that such outcome of the game cannot be obtained for any positive number of coins b in the initial bet.


-----Input-----

The input consists of a single line containing five integers c_1, c_2, c_3, c_4 and c_5 — the number of coins that the first, second, third, fourth and fifth players respectively have at the end of the game (0 ≤ c_1, c_2, c_3, c_4, c_5 ≤ 100).


-----Output-----

Print the only line containing a single positive integer b — the number of coins in the initial bet of each player. If there is no such value of b, then print the only value "-1" (quotes for clarity).


-----Examples-----
Input
2 5 4 0 4

Output
3

Input
4 5 9 2 1

Output
-1



-----Note-----

In the first sample the following sequence of operations is possible:  One coin is passed from the fourth player to the second player;  One coin is passed from the fourth player to the fifth player;  One coin is passed from the first player to the third player;  One coin is passed from the fourth player to the second player.

Difficulty: interview

Starter code:

Solutions:
s = sum(int(i) for i in input().split())

if s > 0 and s % 5 == 0:
    print(s // 5)
else:
    print(-1)


a = list(map(int, input().split()))
s = sum(a)
if s % 5 != 0 or s == 0:
    print(-1)
else:
    print(s // 5)


"""
Codeforces Contest 273 Div 2 Problem A

Author  : chaotic_iak
Language: Python 3.3.4
"""

def main():
    a = sum(read())
    if a == 0 or a % 5:
        print(-1)
    else:
        print(a // 5)

################################### NON-SOLUTION STUFF BELOW

def read(mode=2):
    # 0: String
    # 1: List of strings
    # 2: List of integers
    inputs = input().strip()
    if mode == 0: return inputs
    if mode == 1: return inputs.split()
    if mode == 2: return list(map(int, inputs.split()))

def write(s="\n"):
    if s is None: s = ""
    if isinstance(s, list): s = " ".join(map(str, s))
    s = str(s)
    print(s, end="")

write(main())

n = list(map(int,input().split()))
a = sum(n)
if a%5 == 0 and a!=0:
    print(a//5)
else :
    print('-1')

a = list(map(int,input().split()))
if (sum(a) % len(a) == 0) and (sum(a) != 0):
	print(sum(a) // len(a))
else:
	print(-1)


a,b,c,d,e=map(int,input().split())
sum=a+b+c+d+e

if sum>0 and sum%5==0:
    print(sum//5)
else: print(-1)

x = sum(map(int, str.split(input())))
if x > 0 and x % 5 == 0:

    print(x // 5)

else:

    print(-1)


a = list(map(int, input().split()))
k = 0
for c in a:
	k += c
if (k % 5 == 0) and (k > 0):
	print(int(k / 5))
else:
	print(-1)

a = list(map(int,input().split()))
ss = sum(a)
if ss%5==0 and ss>0:
    print(ss//5)
else:
    print(-1)

print((lambda x: -1 if (x % 5 or not x) else x // 5)(sum(map(int, input().split()))))


s = sum(map(int, input().split()))
if s > 0 and s % 5 == 0:
    print(s // 5)
else:
    print(-1)


arr = list(map(int ,input().split()))
l = len(arr)
s = sum(arr)
if s % l != 0 or s == 0:
    print(-1)
else:
    print(s // l)

a = list(map(int,input().split()))
b = sum(a)
if(b%5 or b == 0):
    print(-1)
else:
    print(int(b/5))


a, b, c, d, e = map(int, input().split())
ans = a + b + c + d + e
if ans % 5 != 0 or ans // 5 < 1:
    print(-1)
else:
    print(ans // 5)

import functools
import operator

x, y = divmod(functools.reduce(operator.add, list(map(int, input().split()))), 5)
print("-1" if y or x == 0 else x)


Sum = sum(list(map(int, input().split())))
if Sum % 5 == 0 and Sum // 5 != 0:
	print(Sum // 5)
else:
	print(-1)

__author__ = 'hamed1soleimani'

ipt = input().split()
s = 0
for i in range(len(ipt)):
    ipt[i] = int(ipt[i])
    s += ipt[i]
if s < 5:
    print(-1)
elif s % 5 == 0:
    print(s // 5)
else:
    print(-1)



A = input().split()
x = 5
s = 0
for i in range(5):
    s += int(A[i])

if (s % x == 0) and (s != 0):
    print(str(s // x))
else:
    print('-1')



inp = [int(x) for x in input().split()]
x = sum(inp)

if x == 0:
    print(-1)
elif x % 5 == 0:
    print(x // 5)
else:
    print(-1)



import sys
f = sys.stdin
#f = open('H:\\Portable Python 3.2.5.1\\test_248B1.txt') 
s = 0
a = [int(u) for u in f.readline().strip().split()]

s = sum(a)

if s % 5 == 0 and s>0:
    print(s//5)
else:
    print(-1)


L=list(map(int,input().split()))
s=sum(L)
n=len(L)
if(s%n==0 and s!=0):
    print(s//n)
else:
    print(-1)


a = list(map(int, input().split()))
if sum(a) > 0 and sum(a) % 5 == 0:
    print(sum(a) // 5)
else:
    print(-1)

a = list(map(int, input().split()))
s = sum(a)
if s % 5 == 0 and s > 0:
    print(int(s/5))
else:
    print(-1)




n=sum(list(map(int,input().split())))
print(-1 if n%5 or n==0 else n//5)