#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int Na,Nb,Nc; cin >> Na >> Nb >> Nc; vector suma(6009),sumb(6009),sumc(6009),Va(6009),Vb(6009),Vc(6009); for(int i=0; i> a; suma.at(a+3000) += a; Va.at(a+3000)++; } for(int i=0; i> b; sumb.at(b+3000) += b; Vb.at(b+3000)++; } for(int i=0; i> c; sumc.at(c+3000) += c; Vc.at(c+3000)++; } for(int i=6007; i>=0; i--) Va.at(i) += Va.at(i+1); for(int i=6007; i>=0; i--) Vb.at(i) += Vb.at(i+1); for(int i=6007; i>=0; i--) Vc.at(i) += Vc.at(i+1); for(int i=6007; i>=0; i--) suma.at(i) += suma.at(i+1); for(int i=6007; i>=0; i--) sumb.at(i) += sumb.at(i+1); for(int i=6007; i>=0; i--) sumc.at(i) += sumc.at(i+1); long long answer = 0; for(int i=0; i<=6000; i++){ long long sa = suma.at(i), va = Va.at(i); if(i) if(va == Va.at(i-1)) continue; for(int k=0; k<=6000; k++){ long long sb = sumb.at(k),vb = Vb.at(k); if(k) if(vb == Vb.at(k-1)) continue; long long now = sa*vb; if(va == 0){ answer = max({answer,now,now+sb*Nc}); continue; } long long border = (-sb+va-1)/va; if(border > 3000) border = 3001; if(border < -3000) border = -3000; long long sc = sumc.at(border+3000),vc = Vc.at(border+3000); answer = max(answer,now+sc*va+sb*vc); } } cout << answer << endl; }