program zadasha1; var n:int64; i,j,k:integer; f1,f2:text; function nsd(i,j:integer): integer; begin if i<>j then begin if (i>j) then i:=i-j else j:=j-i; end; if i<>j then nsd(i,j); end; begin assign(f1,'pair.txt'); reset(f1); readln(f1,n); close(f1); k:=0; for i:=1 to n do for j:=1 to n do begin if i=nsd(i,j) then k:=k+1; end; assign(f2,'pair1.txt'); rewrite(f2); writeln(f2,k); close(f2); end.