program Project2; {$APPTYPE CONSOLE} function nsd(aa,bb:integer):integer; var a,b,t:integer; begin a:=aa; b:=bb; if b0 do begin t:= b mod a; b:=a; a:=t; end; nsd:= b; end; var n,i,j:integer; kol:int64; begin assign(Input,'pair.in'); reset(Input); readln(n); close(Input); kol:=0; for i:=1 to n do for j:=i to n do if nsd(i,j)=i then inc(kol); assign(Output,'pair.out'); rewrite(Output); writeln(kol); close(Output); end.