#include using namespace std; using ll=long long; using vi = vector; using vvi = vector>; using vl = vector; using vvl = vector>; #define all(x) x.begin(),x.end() #define rep(i,j,n) for (long long i = j; i < (long long)(n); i++) #define _GLIBCXX_DEBUG const ll MOD = 1000000007; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } //(a+b-1)/b //priority_queue, greater> q; signed main(){ //cout << fixed << setprecision(10); ll n,k; cin >> n >> k; if(n <= k){ cout <<1 << endl; return 0; } if(n % k != 0 && n <= 2*k){ cout << 3 << endl; return 0; } ll ans = 3; ll j = n /k +(n % k != 0); j -= 2; ans += j; cout << ans << endl; return 0; }