#include #include #include using namespace std; int main() { ifstream in; in.open("exercise.in"); ofstream out; out.open("exercise.out"); int n; in >> n; int _sqrt = sqrt(n * 2); int most = _sqrt * (_sqrt + 1) / 2; if(n > most) out << _sqrt + 1; else out << _sqrt; }