#[macro_export]
macro_rules !read_value {($iter :expr ,($($t :tt ) ,*) ) =>{($(read_value !($iter ,$t ) ) ,*) } ;($iter :expr ,[$t :tt ;$len :expr ] ) =>{(0 ..$len ) .map (|_ |read_value !($iter ,$t ) ) .collect ::<Vec <_ >>() } ;($iter :expr ,{$t :tt =>$f :expr } ) =>{$f (read_value !($iter ,$t ) ) } ;($iter :expr ,chars ) =>{read_value !($iter ,String ) .chars () .collect ::<Vec <char >>() } ;($iter :expr ,usize1 ) =>{read_value !($iter ,usize ) -1 } ;($iter :expr ,$t :ty ) =>{$iter .next () .unwrap () .parse ::<$t >() .unwrap () } ;}
#[macro_export]
macro_rules !input_inner {($iter :expr ) =>{} ;($iter :expr ,) =>{} ;($iter :expr ,mut $var :ident :$t :tt $($r :tt ) *) =>{let mut $var =read_value !($iter ,$t ) ;input_inner !{$iter $($r ) *} } ;($iter :expr ,mut $var :ident $($r :tt ) *) =>{input_inner !{$iter ,mut $var :usize $($r ) *} } ;($iter :expr ,$var :ident :$t :tt $($r :tt ) *) =>{let $var =read_value !($iter ,$t ) ;input_inner !{$iter $($r ) *} } ;($iter :expr ,$var :ident $($r :tt ) *) =>{input_inner !{$iter ,$var :usize $($r ) *} } ;}
#[macro_export]
macro_rules !input {(source =$s :expr ,$($r :tt ) *) =>{let mut iter =$s .split_whitespace () ;input_inner !{iter ,$($r ) *} } ;(iter =$iter :ident ,$($r :tt ) *) =>{let s ={use std ::io ::Read ;let mut s =String ::new () ;std ::io ::stdin () .read_to_string (&mut s ) .unwrap () ;s } ;let mut $iter =s .split_whitespace () ;input_inner !{$iter ,$($r ) *} } ;($($r :tt ) *) =>{let s ={use std ::io ::Read ;let mut s =String ::new () ;std ::io ::stdin () .read_to_string (&mut s ) .unwrap () ;s } ;let mut iter =s .split_whitespace () ;input_inner !{iter ,$($r ) *} } ;}
#[derive(Clone, Debug)]
pub struct PrimeTable {
    table: Vec<usize>,
}
impl PrimeTable {
    pub fn new(max_n: usize) -> Self {
        let mut table = vec![1; max_n + 1];
        table[0] = 0;
        table[1] = 0;
        for i in 2..=(max_n as f32).sqrt() as usize {
            if table[i] == 1 {
                for j in (i * i..=max_n).step_by(i) {
                    if table[j] == 1 {
                        table[j] = i;
                    }
                }
            }
        }
        PrimeTable { table }
    }
    pub fn is_prime(&self, n: usize) -> bool {
        self.table[n] == 1
    }
    pub fn prime_factors(&self, mut n: usize) -> Vec<(usize, usize)> {
        let mut factors = vec![];
        while self.table[n] > 1 {
            let p = self.table[n];
            let mut cnt = 1;
            n /= p;
            while self.table[n] == p {
                n /= p;
                cnt += 1;
            }
            if n == p {
                cnt += 1;
                n /= p;
            }
            factors.push((p, cnt));
        }
        if n > 1 {
            factors.push((n, 1));
        }
        factors
    }
}
fn main() {
    #[allow(unused_imports)]
    use std::io::Write as _;
    let __out = std::io::stdout();
    #[allow(unused_mut, unused_variables)]
    let mut __out = std::io::BufWriter::new(__out.lock());
    #[allow(unused_macros)]
    macro_rules !print {($($arg :tt ) *) =>(::std ::write !(__out ,$($arg ) *) .unwrap () ) }
    #[allow(unused_macros)]
    macro_rules !println {($($arg :tt ) *) =>(::std ::writeln !(__out ,$($arg ) *) .unwrap () ) }
    #[allow(unused_macros)]
    macro_rules! echo {
        ($iter :expr ) => {
            echo!($iter, "\n")
        };
        ($iter :expr ,$sep :expr ) => {
            let mut iter = $iter;
            if let Some(item) = iter.next() {
                print!("{}", item);
            }
            for item in iter {
                print!("{}{}", $sep, item);
            }
            println!();
        };
    }
    input!(n);
    let mut ans = 0usize;
    let pt = PrimeTable::new(n);
    for i in 1..=n {
        ans += i * pt
            .prime_factors(i)
            .into_iter()
            .map(|(_, c)| c + 1)
            .product::<usize>();
    }
    println!("{}", ans);
}


Measured memory_bytes: 80212