#include using namespace std; typedef long long ll; int main() { int n; cin>>n; for (int i=0;;i++) { int a=i*(i+1)/2; if (n