#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define MOD 1000000007 #define MOD2 998244353 #define INF (1<<29) #define LINF (1LL<<60) #define EPS (1e-10) #define PI 3.1415926535897932384626433832795028 typedef long long Int; typedef pair P; typedef long double Real; typedef complex CP; Int A, B, C, D, E; bool ok(Int x){ Int a = A - 3*x; Int b = B - 3*x; Int c = C - 3*x; Int d = D - 3*x; Int e = E - 3*x; } int main(){ cin >> A >> B >> C >> D >> E; Int bottom = 0; Int top = A + B + C + D + E; while(top - bottom > 1){ Int mid = (top + bottom ) / 2; if(ok(mid))bottom = mid; else top = mid; } cout << bottom << endl; return 0; }