import java.util.Scanner; public class Test{ public static void main(String[] arg){ Scanner sc = new Scanner(System.in); int n; n = Integer.parseInt(sc.next()); Long res = (long)0,tempc,tempd; for(int i = 0;i