Polygons

题意翻译

有两个整数 $n$($3\leq n\leq 10^6$)和 $k$($1\leq k\leq n-2$)。 你要建出 $k$ 个有相同外接圆的正 $a_i$ 边形($3\leq a_i\leq n$ 且每一个 $a_i$ 都不相同)。 你可以在圆里转动这些正 $a_i$ 边形使某些正 $a_i$ 边形在圆上的点重合,圆上的点的总数减少。 您要输出,当圆上的点最小的时候有几个点。 样例说明: ![](https://cdn.luogu.org/upload/vjudge_pic/CF1208G/95991da251ccd37f8f076c85876463789e724ae5.png) 如图:当 $n=6$,$k=2$ 时,可以选择 $3,4,5,6$ 其中的两个作为边。当我们选择 $3,6$ 作为边的时候,就可以旋转正三角形来使正三角形的三个点都与正六边形重合,这样总共只有 $6$ 个点了,所以输出 $6$。

题目描述

You are given two integers $ n $ and $ k $ . You need to construct $ k $ regular polygons having same [circumcircle](https://en.wikipedia.org/wiki/Circumscribed_circle), with distinct number of sides $ l $ between $ 3 $ and $ n $ . ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1208G/95991da251ccd37f8f076c85876463789e724ae5.png)Illustration for the first example.You can rotate them to minimize the total number of distinct points on the circle. Find the minimum number of such points.

输入输出格式

输入格式


The only line of input contains two integers $ n $ and $ k $ ( $ 3 \le n \le 10^{6} $ , $ 1 \le k \le n-2 $ ), the maximum number of sides of a polygon and the number of polygons to construct, respectively.

输出格式


Print a single integer — the minimum number of points required for $ k $ polygons.

输入输出样例

输入样例 #1

6 2

输出样例 #1

6

输入样例 #2

200 50

输出样例 #2

708

说明

In the first example, we have $ n = 6 $ and $ k = 2 $ . So, we have $ 4 $ polygons with number of sides $ 3 $ , $ 4 $ , $ 5 $ and $ 6 $ to choose from and if we choose the triangle and the hexagon, then we can arrange them as shown in the picture in the statement. Hence, the minimum number of points required on the circle is $ 6 $ , which is also the minimum overall possible sets.