#include #include #include #include #include #include #include #include using ll = long long; using namespace std; int arr[3]; int add_num() { //cout << arr[0] << " " << arr[1] << " " << arr[2] << endl; if (arr[0] == 0 && arr[1] == 0) { if ((arr[2] / 4) % 2 != 0) { if (arr[2] == 5) { arr[0] = 2; arr[1] = 2; } else { arr[0] += (arr[2] - 3) / 4; arr[1] += (arr[2] - 3) / 4; } } else { arr[0] += arr[2] / 4; arr[1] += arr[2] / 4; } arr[2] -= (arr[0] + arr[1]); arr[0] /= 2; arr[1] /= 2; } else { if ((arr[2] + 1) / 2 % 2 != 0) { arr[0] += (arr[2] - 1) / 2; arr[2] -= arr[0]; } else { arr[0] += (arr[2] + 1) / 2; arr[2] -= arr[0]; } arr[0] /= 2; } cout << arr[0] << " " << arr[1] << " " << arr[2] << endl; int t = min(arr[0], min(arr[1], arr[2])); arr[0] -= t; arr[1] -= t; arr[2] -= t; return t; } int main(void) { cin >> arr[0] >> arr[1] >> arr[2]; //cout << arr[0] << " " << arr[1] << endl; sort(arr, arr + 3); int ans = arr[0]; arr[2] -= arr[0]; arr[1] -= arr[0]; arr[0] = 0; cout << ans << endl; while (1) { int t = add_num(); if (t > 0) { ans += t; cout << ans << endl; } else break; sort(arr, arr + 3); } cout << ans << endl; return 0; }