#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair i_i; typedef pair ll_i; typedef pair d_i; typedef pair ll_ll; typedef pair d_d; struct edge { int u, v; ll w; }; ll MOD = 1000000007; ll _MOD = 1000000009; double EPS = 1e-9; int main() { int R, G, B; cin >> R >> G >> B; vector a(3); a[0] = R; a[1] = G; a[2] = B; int maxi = 0; for (int t = 0; t < 100000000; t++) { sort(a.begin(), a.end()); maxi = max(maxi, a[0]); if (a[2] >= 2) { a[0]++; a[2] -= 2; } } cout << maxi << endl; }