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.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;
 
public  class realfast implements Runnable {
    private static final int INF = (int) 1e9;
 
    public  void solve() throws IOException 
    {
     int n = readInt();
     int parent[]= new int[n+1];  
     for(int i=2;i<=n;i++)
      parent[i]=i;

     long val[]= new long[n+1];
     for(int i=2;i<=n;i++)
     {
      for(int j=2*i;j<=n;j=j+i)
      {
        val[j]= val[j]+4*(j/i); 
        union(parent,i,j);	
      } 	
     }
     
     
     long arr[]= new long[n+1];
     for(int i=2;i<=n;i++)
     {
     	int par1 = find(parent,i);
     	arr[par1]= arr[par1]+val[i];
     }
     
     long max=0;

     for(int i =2;i<=n;i++)
     {
      if(find(parent,i)==i)
      max=Math.max(max, arr[i]);	
     }
     out.println(max);


    }
    public int find(int parent[], int i)
    {
     if(parent[i]==i)
     return i;
     parent[i]= find(parent,parent[i]);
     return parent[i];	
    }
    public void union(int parent[], int i , int j)
    {
     int par1= find(parent,i);
     int par2= find(parent,j);
     if(par1==par2)
     return ;
     if(par1<par2)
     parent[par2]= par1;
     else
     parent[par1]= par2;
    	
    }


    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    public static void main(String[] args) {
        new Thread(null, new realfast(), "", 128 * (1L << 20)).start();
    }
 
    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter out;
 
    @Override
    public void run() {
        try {
            if (ONLINE_JUDGE || !new File("input.txt").exists()) {
                reader = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                reader = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            solve();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                reader.close();
            } catch (IOException e) {
                // nothing
            }
            out.close();
        }
    }
 
    private String readString() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
 
    @SuppressWarnings("unused")
    private int readInt() throws IOException {
        return Integer.parseInt(readString());
    }
 
    @SuppressWarnings("unused")
    private long readLong() throws IOException {
        return Long.parseLong(readString());
    }
 
    @SuppressWarnings("unused")
    private double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }
}
class edge implements Comparable<edge>{
    int u ;
    int v ;
    int val;
    edge(int u1, int v1 , int val1)
    {
       this.u=u1;
       this.v=v1;
       this.val=val1;
    }
    public int compareTo(edge e)
    {
        return this.val-e.val;
    }
}