Preparando MOJI

Petya and Origami

1000ms 262144K

Description:

Petya is having a party soon, and he has decided to invite his $$$n$$$ friends.

He wants to make invitations in the form of origami. For each invitation, he needs two red sheets, five green sheets, and eight blue sheets. The store sells an infinite number of notebooks of each color, but each notebook consists of only one color with $$$k$$$ sheets. That is, each notebook contains $$$k$$$ sheets of either red, green, or blue.

Find the minimum number of notebooks that Petya needs to buy to invite all $$$n$$$ of his friends.

Input:

The first line contains two integers $$$n$$$ and $$$k$$$ ($$$1\leq n, k\leq 10^8$$$) — the number of Petya's friends and the number of sheets in each notebook respectively.

Output:

Print one number — the minimum number of notebooks that Petya needs to buy.

Sample Input:

3 5

Sample Output:

10

Sample Input:

15 6

Sample Output:

38

Note:

In the first example, we need $$$2$$$ red notebooks, $$$3$$$ green notebooks, and $$$5$$$ blue notebooks.

In the second example, we need $$$5$$$ red notebooks, $$$13$$$ green notebooks, and $$$20$$$ blue notebooks.

Informação

Codeforces

Provedor Codeforces

Código CF1080A

Tags

math

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 09:41:08

Relacionados

Nada ainda