import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { long n=0, max=0, cnt=0; Scanner sc= new Scanner(System.in); n = (int)sc.nextLong(); long[] candles = new long[(int)n]; for (int i=0; i