Andrew n pile stone the ith pile contain a_i stone he want table clean decide stone 1st nth pileAndrew perform follow operation number time choose 3 index 1 le j k le n jth pile contain 2 stone take 2 stone pile j put stone pile stone pile k tell Andrew minimum number operation need stone pile 1 n determine impossible