28237
 13190
 39914
 81367
 8554
 61106
 67448
 39004
 22308
 16054
 71468
 60501
 100
 300
 59632
 90783
 5611
 1000
 69475
 69753
 10
 5
 582
 8
 36961
 5071
 20
 53213
 92775
 28738
 100000
 92280
 37944
 9
 2627
 7
 3

1028306548 224346172 2054738392 8539207488 94344524 4816051228 5867563092 1962150044 641839188 332342852 6587875268 4721174212 12600 115440 4586497300 10630118936 40580456 1286328 6225539588 6275533596 92 8 434692 52 1762017168 33141852 440 3652070664 11101694484 1065137992 12898363344 10983871880 1856988304 64 8885348 28 0
import java.util.*;
import java.io.*;
import java.math.*;
public class Main3
{
    static class Reader 
    { 
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;} 
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];} 
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;} 
        public String s(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();} 
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;} 
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;} 
        public double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } 
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } 
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = i();}return ret;}
    }
    
    
 
           //       |----|       /\      |    |   -----   |
           //       |   /       /  \     |    |     |     |
           //       |--/       /----\    |----|     |     |
           //       |   \     /      \   |    |     |     |
           //       |    \   /        \  |    |   -----   -------

    static int n;
    static class pair 
    {
       int x;
       int y;
       public pair (int aa, int bb) 
       {
           x = aa;
           y = bb;
       }
       @Override
       public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            pair pair = (pair) o;
            return x == pair.x && y == pair.y;
        }
    
       @Override
       public int hashCode() {
            return Objects.hash(x, y);
       }
    }
    public static void main(String[] args)throws IOException
    {
        PrintWriter out= new PrintWriter(System.out);
        Reader sc=new Reader();
        n=sc.i();
        long start=0;
        HashSet<pair> hs=new HashSet<>();
        int a=2;
        long ans=0;
        while(true)
        {
            System.out.println(a);
            int inv=a;
            for(int b=2;;b++)
            {
                if(Math.abs(a*b)>n)
                break;
                if(!hs.contains((new pair(a,a*b))))
                {
                    ans+=b;
                    hs.add(new pair(a,a*b));
                    hs.add(new pair(a*b,a));
                    a*=b;
                    break;
                }
            }
            if(a!=inv)continue;
            for(int b=-2;;b--)
            {
                if(Math.abs(a*b)>n)
                break;
                if(!hs.contains((new pair(a,a*b))))
                {
                    ans-=b;
                    hs.add(new pair(a,a*b));
                    hs.add(new pair(a*b,a));
                    a*=b;
                    break;
                }
            }
            if(a!=inv)continue;
            for(int i=2;i<=Math.sqrt(Math.abs(a));i++)
            {
                if(Math.abs(a)%i==0)
                {
                    if(!hs.contains((new pair(a,a/i))))
                    {
                        ans+=i;
                        hs.add(new pair(a,a/i));
                        hs.add(new pair(a/i,a));
                        a/=i;
                        break;
                    }
                }
            }
            if(a!=inv)continue;
            for(int i=-2;i>=-Math.sqrt(Math.abs(a));i--)
            {
                if(Math.abs(a)%Math.abs(i)==0)
                {
                    if(!hs.contains((new pair(a,a/i))))
                    {
                        ans-=i;
                        hs.add(new pair(a,a/i));
                        hs.add(new pair(a/i,a));
                        a/=i;
                        break;
                    }
                }
            }
            if(a!=inv)continue;
            break;
        }
        out.println(ans);
        out.flush();
    }
}