import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
{
Scanner scan
= new Scanner
(System.
in); long s = scan.nextLong();
double k
= Math.
floor(Math.
sqrt(2 * s
+ 1)); int ans = (int) k;
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgc2NhbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJbG9uZyBzID0gc2Nhbi5uZXh0TG9uZygpOwoJCWRvdWJsZSBrID0gTWF0aC5mbG9vcihNYXRoLnNxcnQoMiAqIHMgKyAxKSk7CgkJaW50IGFucyA9IChpbnQpIGs7CgkJU3lzdGVtLm91dC5wcmludGxuIChhbnMpOwoJfQp9