ural 1255. Graveyard of the Cosa Nostra

1255. Graveyard of the Cosa Nostra

Time limit: 1.0 second
Memory limit: 64 MB
There is a custom among the Ural Mafiosi — a big Mafioso’s coffin is to be carried by all his subordinates. The length of the coffin (in meters) equals to the number of the Mafioso’s subordinates in order not to let the carriers to encumber each other. As it happens, according to the ancient custom the width of a coffin is equal to 1 meter. So, the length of a coffin shows a dead man’s authority. By the way, the Ural Mafiosi are very scrupulous in matters of authority and will not bear neighborhood with less authoritative Mafioso. So, at one cemetery it’s possible to bury Mafiosi with equal authority. According to the Mafiosi’s custom a cemetery must be square. A cemetery length must be an integer number of meters.
You are to count how many Mafiosi can be buried on the cemetery of the given size. Coffins must be parallel to cemetery borders, coffins mustn’t overlap each other and get off the cemetery.

Input

Contains two numbers — a length of the cemetery N (1 < N < 10000) and a length of a coffin K (1 < K< 10000).

Output

The single integer number — the most amount of the coffins of the size 1×K that may be buried at the cemetery of the size N×N.

Sample

inputoutput
5 4
6
Problem Author: Stanislav Vasilyev, Alexey Lakhtin
Problem Source: Open collegiate programming contest for student teams, Ural State University, March 15, 2003
posted @ 2015-12-26 11:11  yanzx6  阅读(237)  评论(0编辑  收藏  举报