import java.util.*; public class Main { public static void main(String[] args) throws Exception { final int input = 3; Scanner in = new Scanner(System.in); int result = 0; List list = new ArrayList<>(); for(int i=0; i