import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int ans=Integer.MAX_VALUE; int[] block = new int[101]; int motokazu=0; for(int i=0;i0;l--){ kazu+=l; pira[j]=l; j++; } break; } if(motokazupira[j]){ dai+=block[j]-pira[j]; }else if(block[j]syou){ ans=Math.min(ans, dai); } } System.out.println(ans); } }