import java.util.*; import java.io.*; public class Main{ static final Reader sc = new Reader(); static final PrintWriter out = new PrintWriter(System.out,false); public static void main(String[] args) throws Exception { Long n = sc.nextLong(); Long l; Long r; Long ans = new Long(0); for(Long i=new Long(1);i