#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"n,k=map(int,input().split())\n"
"a=(n-k)*(n-k+1)//2\n"
"for i in range(k+1,n):\n"
"    j=n//i*i\n"
"    a+=(j//i-1)*(i-k)+max(n-j+1-max(k,1),0)\n"
"print(a)\n"
"\"";
  system(s);
  return 0;
}            