let array consist n positive great 0 integer beautiful follow condition hold 1 n a_i 1 number a_i 1 a_i 2 exist array wellfor example array 5 3 1 beautiful a_1 number a_1 2 3 exist array a_2 number a_2 2 1 exist array a_3 condition a_3 1 hold array 1 2 2 2 2 beautiful a_1 condition a_1 1 hold number a_i number a_i 1 1 exist array array 1 4 beautiful a_2 a_2 2 2 a_2 1 3 exist array a_2 ne 1 array 2 beautiful a_1 a_1 1 1 a_1 2 0 exist array a_1 ne 1 array 2 1 3 beautiful a_1 number a_1 1 1 exist array a_2 condition a_2 1 hold a_3 number a_3 2 1 exist array you give positive integer s find minimum possible size beautiful array sum element equal s