99 100 100 100 100
 57 83 11 4 93
 99 99 99 99 99
 100 0 0 0 0
 0 1 2 3 4
 93 100 99 90 98
 87 38 19 33 100
 1 1 1 1 1
 0 0 0 0 1
 2 3 4 5 6
 1 2 1 2 3
 0 0 0 0 0
 100 100 100 100 100
 43 83 1 0 23
 43 83 1 100 23
 56 0 0 0 4
 99 98 98 99 100

-1
 -1
 99
 20
 2
 96
 -1
 1
 -1
 4
 -1
 -1
 100
 30
 50
 12
 -1

#include<bits/stdc++.h>
#include<conio.h>
#define INF 1000000000

using namespace std;
#define ff first
#define ss second
#define minimum(a,b) (a>b?b:a)
#define pb push_back
typedef long long ll;
#define vi vector<int>
#define pi pair<int,int> 
#define vl vector<ll>
#define pl pair<ll,ll>
#define vl vector<ll>
#define vpi vector<pi>
#define repa(i,begin,end) (_typeof(end) i=begin-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
#define M 1000000007
ll dif(ll a,ll b) {
	if(a-b>0) return a-b;
	else return b-a;                                                                                                                     
}
int gcd(int a,int b) {
	if(a==0) return b;
	return  gcd(b%a,a);
}
int main() {

            int x,i;
            int sum=0;
            for(i=0;i<5;i++) {
            	cin>>x;
            	sum+=x;
            }
            if(sum%5==0) cout<<sum/5<<endl;
            else cout<<"-1"<<endl;
            
	    return 0;

}