#include<bits/stdc++.h>
#define ll long long
using namespace std;
inline ll rd(){
ll s=0;
char ch=getchar();
while(ch<'0'||ch>'9')ch=getchar();
while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
return s;
}
void wt(ll x){
if(x>9) wt(x/10);
putchar(x%10+'0');
return;
}
ll a,b,c,x;
int main(){
a=rd(),b=rd(),c=rd();
while(1){
x++;
if(a-x>=0) a-=x;
else {x--;break;}
if(b-x>=0) b-=x;
else {x--;break;}
}
while(1){
x++;
if(a+c-x>=0) c-=(x-a),a=0;
else {x--;break;}
if(b+c-x>=0) c-=(x-b),b=0;
else {x--;break;}
}
wt(x);
return 0;
}
求助