import java.util.*; public class Test10 { public static void main(String[] args){ Scanner sc=new Scanner(System.in); String line; line=sc.nextLine(); int a=Integer.parseInt(line),n=1+2; String result="NO"; for(int i=3;result.equals("NO");i++){ n+=i; if(a