eolymp
bolt
Try our new interface for solving problems
Problems

Paint2D-Crack

Paint2D-Crack

Time limit 1 second
Memory limit 64 MiB

The beginning hacker-programmer Nevmiyko injured the source code of the licensed acquired graphics editor Paint2D. After the start an editor automatically creates the working field in a kind to the square by size N × N, and on him builds the maximally possible amount of rectangles by size 1 × M.

You know N and М, help to count up to Nevmiyko, what amount of operations К here automatically executes editor, if at the start he has only a template to the square 1 × 1, and as a result of the unsuccessful breaking is able yet and "rotate" a rectangle 1 × М on 90°.

We remind, that the licensed graphics editor was able to execute operations "select", "copy" "move" and "insert".

Input data

2 number is N and M (1N, M1000).

Output data

Amount of the К operations.

Examples

Input example #1
4 3
Output example #1
19
Author Анатолий Присяжнюк