Олимпиадный тренинг

Задача 38750. Saucer repair


Задача

Темы:
Arriving home, tired Konstantin wanted to drink his favorite tea. To do this, he needed to get the most beautiful saucer from a high shelf, which is a checkered field N× N. But, since Konstantin is not very neat, he broke the saucer.
In a hurry, Kostya began to think how to fix such a valuable thing. And then he noticed that the saucer broke up exactly into checkered squares K × K! Moreover, he discovered that N is divisible by K without a remainder.
Having restored the original saucer from the pieces, Kostya realized that he also needed to buy glue in order to glue all the pieces in contact into the original checkered field N × N. He immediately considered that, in order to glue the border & nbsp; between two adjacent cells of length 1, exactly one jar of glue is needed.
Help Kostya calculate how many cans of glue he needs to buy to glue his favorite saucer.

Input
The first line of the input contains one integer N (1 ≤ N ≤ 104 ) — the size of a square saucer.
The second line contains one integer K (1 ≤ K ≤ N, N is divisible by K without a remainder) — the size of a square fragment of a saucer.

Imprint
In a single line print a single number — the number of cans of glue Kostya will need to buy to fix the saucer.
If the saucer didn't actually break and Kostya panicked for no reason, print the number 0.

Examples
# Input Output Explanations
1 2
1
4
The different colors represent the different parts of the saucer, which originally measured 2.times. 2. Between the parts, the white color indicates the glue that Kostya bought and smeared to fix the saucer. Each part of the saucer has a size of 1 x times; 1.
2 3
3
0 Kostya panicked for nothing, and in fact he did not break the saucer!