ulong f(ulong X) {
	return X.getDivisors.count;
}

void main() {
	// N = 50000, 100000, 150000, ..., 9995000, 1000000
	ulong[] arr = [14343475240, 60838190672, 141448665788, 257212470774, 408875452660, 596981215450, 821990325762, 1084296609104, 1384261675499, 1722125036282, 2098185047461, 2512661322551, 2965792104633, 3457770622390, 3988800240289, 4558987534475, 5168559295617, 5817729717828, 6506418585007, 7235062807366, 8003510992854, 8812039622862, 9660719955296, 10549659220862, 11479011688245, 12448845177256, 13459323658561, 14510332007222, 15602136739002, 16734924755096, 17908481787130, 19123138141378, 20379057733244, 21675833225770, 23013964372551, 24393634293809, 25814409354826, 27276821356759, 28780788606772, 30326413365285, 31913376078550, 33542358268005, 35212812420453, 36925459066686, 38679944926812, 40476248899052, 42314367955206, 44194833598353, 46117511559977, 48081994935671, 50088943167842, 52138123487538, 54229542299288, 56363615930452, 58539707599783, 60758384185743, 63019567631040, 65323182791149, 67669778128369, 70058785460280, 72490226710653, 74964555109988, 77481786106093, 80041527790312, 82644353395127, 85290161753688, 87978318105507, 90709780843282, 93484427284737, 96301520878991, 99162032503100, 102065855149715, 105012670748303, 108002269398516, 111035349416856, 114111807921375, 117231448199853, 120394329084663, 123600339753238, 126850549017804, 130143314566922, 133479467089246, 136859038394801, 140282617787827, 143749192448739, 147259491582477, 150813537261139, 154411235469265, 158052520943755, 161737467121483, 165465511572167, 169238102781982, 173053807479870, 176913242475822, 180816973674988, 184764302482181, 188755167873661, 192790925674795, 196869911666370, 200992441246692, 205159280851458, 209370037656611, 213624780221079, 217923890158764, 222266481117362, 226653316365413, 231084619915589, 235560022983960, 240079430075503, 244642548171917, 249249827129502, 253902107151677, 258598042267722, 263338334303632, 268122443879733, 272951354222680, 277825672031685, 282742772106696, 287704245795420, 292711324081941, 297762174014958, 302856699362737, 307996718856936, 313180253381239, 318409439232054, 323682486495499, 328999565677832, 334361760892115, 339768196320246, 345219904513529, 350715682647270, 356256480873339, 361841581744271, 367470747430202, 373145655996233, 378864539458650, 384628186031971, 390437889429971, 396290295634134, 402188826344049, 408131530592604, 414118956306590, 420152374263135, 426229374669116, 432351372593538, 438519040875971, 444731555754762, 450987322450746, 457290058813673, 463635895079489, 470028210141922, 476465015795706, 482947253439277, 489473701762655, 496045307801936, 502662434241804, 509324212044955, 516031076204871, 522783440474442, 529581632274134, 536423313695403, 543311223215741, 550242029951411, 557220889209512, 564243999095306, 571311613610574, 578425754453253, 585584064718129, 592787459417657, 600036645526326, 607331619426194, 614670553358276, 622055857989353, 629486032479553, 636961255455435, 644482906053419, 652049535718977, 659661281999214, 667318419340188, 675021515919670, 682768038722362, 690561394962114, 698400976891086, 706285619557381, 714214048734419, 722190402701363, 730211681284985, 738276491989247, 746388997301993, 754546104527913, 762748254977255, 770997444637057, 779290962936659, 787630213195247, 796016413077051, 804447590347769, 812923504620281, 821446543739323, 830013193599069, 838627288460105];
	ulong tmp;
	auto N = ri;
	auto s = (N / 50000) * 50000;
	debug s.writeln;
	ulong res;
	if(N / 50000 > 0) res += arr[N / 50000 - 1];
	if(N % 50000 != 0) foreach(i; s+1..N+1) {
		res += i*f(i);
	}
	res.writeln;
}

ulong[] getDivisors(ulong N) { // assumeSorted できる
	if(N == 0) return [];
	if(N == 1) return [1];
	ulong[] lower_part, upper_part;
	foreach(i; 1..N.to!real.sqrt.ceil.to!ulong) {
		if(N % i == 0) {
			lower_part ~= i;
			upper_part ~= N / i;
		}
	}
	upper_part.reverse();
	if(N.to!real.sqrt.to!ulong ^^ 2 == N) return lower_part ~ N.to!real.sqrt.to!ulong ~ upper_part;
	else return lower_part ~ upper_part;
}

// ===================================

import std.stdio;
import std.string;
import std.functional;
import std.algorithm;
import std.range;
import std.traits;
import std.math;
import std.container;
import std.bigint;
import std.numeric;
import std.conv;
import std.typecons;
import std.uni;
import std.ascii;
import std.bitmanip;
import core.bitop;

T readAs(T)() if (isBasicType!T) {
	return readln.chomp.to!T;
}
T readAs(T)() if (isArray!T) {
	return readln.split.to!T;
}

T[][] readMatrix(T)(uint height, uint width) if (!isSomeChar!T) {
	auto res = new T[][](height, width);
	foreach(i; 0..height) {
		res[i] = readAs!(T[]);
	}
	return res;
}

T[][] readMatrix(T)(uint height, uint width) if (isSomeChar!T) {
	auto res = new T[][](height, width);
	foreach(i; 0..height) {
		auto s = rs;
		foreach(j; 0..width) res[i][j] = s[j].to!T;
	}
	return res;
}

int ri() {
	return readAs!int;
}

long rl() {
	return readAs!long;
}

double rd() {
	return readAs!double;
}

string rs() {
	return readln.chomp;
}