#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define VSORT(v) sort(v.begin(), v.end()) int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); vector stone(3); REP(i, 3) cin >> stone[i]; VSORT(stone); while (stone[2] >= stone[0] + 2) { stone[2] -= 2; stone[0]++; VSORT(stone); } cout << stone[0] << endl; return 0; }