import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); int[] values = new int[n + 1]; for (int i = 1; i <= n; i++) { values[i] = i; } boolean[] isNotPrimes = new boolean[10000]; for (int i = 2; i * i <= n; i++) { if (!isNotPrimes[i]) { for (int j = 2; j * i < isNotPrimes.length; j++) { isNotPrimes[j * i] = true; } for (int j = 1; i * i * j <= n; j++) { values[i * i * j] /= i * i; } } } int[] counts = new int[n + 1]; for (int i = 1; i <= n; i++) { counts[values[i]]++; } long ans = 0; for (int x : counts) { ans += x * (x - 1L) / 2 * 2; } System.out.print(ans + n); } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); StringBuilder sb = new StringBuilder(); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }