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 ex = Long.parseLong("1000007"); Long l = new Long(1); Long r = n; Long ans = new Long(0); if(n