G. Polygons
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given two integers $n$ and $k$.

You need to construct $k$ regular polygons having same circumcircle, with distinct number of sides $l$ between $3$ and $n$. 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.

Input

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.

Output

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

Examples
Input
6 2

Output
6

Input
200 50

Output
708

Note

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.
{"ft_lang_label":"__label__en","ft_lang_prob":0.885184,"math_prob":0.9999113,"size":1026,"snap":"2020-34-2020-40","text_gpt3_token_len":261,"char_repetition_ratio":0.1594912,"word_repetition_ratio":0.022727273,"special_character_ratio":0.34405458,"punctuation_ratio":0.10050251,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99987245,"pos_list":[0,1,2],"im_url_duplicate_count":[null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-28T20:05:38Z\",\"WARC-Record-ID\":\"<urn:uuid:42b1f91a-7c4f-4d93-96bd-a19bd878e185>\",\"Content-Length\":\"56007\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d2acfd6a-072b-4e66-81fb-df34dcdddfa6>\",\"WARC-Concurrent-To\":\"<urn:uuid:dd9aa775-876a-42ef-81a9-da8074efe694>\",\"WARC-IP-Address\":\"81.27.240.126\",\"WARC-Target-URI\":\"http://codeforces.com/problemset/problem/1208/G\",\"WARC-Payload-Digest\":\"sha1:NRWBA5AL4U6X4BM7ZZZYXGWSFNFXKG6E\",\"WARC-Block-Digest\":\"sha1:XOHGFLQPLN5EKANJQRKJBTRRRT5X7VC3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600401604940.65_warc_CC-MAIN-20200928171446-20200928201446-00167.warc.gz\"}"}