#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" #define rep(i,n) for(int i = 0;i < n;i++) #define REP(i,n,k) for(int i = n;i < k;i++) #define P(p) cout<<(p)<> ret; return ret; } bool isPrime(ll n){ if (n % 2 == 0)return false; for (ll i = 3; i*i <= n; i += 2){ if (n%i == 0)return false; } return true; } void solve() { int s[3]; cin >> s[0] >> s[1] >> s[2]; int left = 0, right = 100000000; while (left < right){ int mid = (left + right) / 2; if (mid == 0)break; int need = 0; int amari = 0; rep(i, 3){ if (s[i] < mid){ need += mid - s[i]; } else{ amari += ((s[i] - mid)/2); } } int gap = need - amari; if (gap < 0){ left = mid+1; } else if(gap > 0){ right = mid; } else{ P(mid); return; } } P((left + right) / 2); } int main() { solve(); return 0; }