Petya is having a party soon, and he has decided to invite his nn 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 kk sheets. That is, each notebook contains kk sheets of either red, green, or blue.

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

Input

The first line contains two integers nn and kk (1≤n,k≤1081≤n,k≤108) — 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.

Petya is having a party soon, and he has decided to invite his nn 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 kk sheets. That is, each notebook contains kk sheets of either red, green, or blue.

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

Input

The first line contains two integers nn and kk (1≤n,k≤1081≤n,k≤108) — 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.

Examples

input

Copy

3 5
output

Copy

10
input

Copy

15 6
output

Copy

38
Note

In the first example, we need 22 red notebooks, 33 green notebooks, and 55 blue notebooks.

In the second example, we need 55 red notebooks, 1313 green notebooks, and 2020 blue notebooks.

题解:此题太水,基本都会

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
using namespace std; int main()
{
int n,k;
cin>>n>>k;
int red=n*/k;
int green=n*/k;
int blue=n*/k;
if(red<n*2.0/k)
{
red=red+;
}
if(green<n*5.0/k)
{
green=green+;
}
if(blue<n*8.0/k)
{
blue+=;
}
cout<<red+green+blue<<endl;
return ;
}

最新文章

  1. Hyper-v 安装CentOS 7 (其他虚拟机一样参考)
  2. iOS 微信支付总结
  3. 由面试引发的思考:B/S与C/S究竟是何物
  4. 前端Javascript书籍分享
  5. 移动混合开发之HTML5在移动开发中的准则
  6. 黑马程序员——JAVA基础之Map集合
  7. PID入门的十五个基本概念
  8. 面试题(C#算法编程题)
  9. html5时间选择器
  10. 测试使用wiz来发布blog
  11. Codeforces Round #143 (Div. 2) (ABCD 思维场)
  12. 使用ganymed-ssh2-build通过ssh获得远程服务器参数
  13. MapReduce/Hbase进阶提升(原理剖析、实战演练)
  14. 如何在Windows Server 2016启用或关闭Internet Explorer增强的安全配置
  15. MyEclipse编码方式设置
  16. PYTHON-模块 re subprocess
  17. windows 10, v1903 正式版下载
  18. union排序,起别名将两个不同的字段ZCDZ,SCJYDZ 变成同一个别名dz,进行排序;增加一个字段z,进行排序。
  19. L1&amp;L2 Regularization的原理
  20. JS获取客户端公网IP和IP地址

热门文章

  1. DAY7-面向对象之多态与多态性
  2. -bash : ** : command not found的问题解决(图文详解)
  3. js对象排序&amp;&amp;倒序
  4. day17 12.复习
  5. A - Dictionary
  6. SDUT 3399 数据结构实验之排序二:交换排序
  7. php获取数据库结果集
  8. Java50道经典习题-程序28 排序算法
  9. HTML与CSS入门经典(第9版)试读 附随书源码 pdf扫描版​
  10. Delphi和C#数据类型对应表