#!/usr/bin/env python3
n = int(input())
for i in range(10**100):
    if i*(i+1)//2 > n:
        print(i-1)
        break
