# a = int(input())
# s = 0
# for i in range(a):
# x, y = map(int, input().split())
# n = y % x
# s += n
# print(s)
# n = input()
# a = 99
# print('Hello, world!', n, '99 bottles of beer on the wall, 99 bottles of beer. ')
# print('Take one down and pass it around, ', end='')
# for i in range(1, 98):
# a -= 1
# print(a, 'bottles of beer on the wall. ')
# print(a, 'bottles of beer on the wall,', a, 'bottles of beer. ')
# print('Take one down and pass it around, ', end='')
# print('1 bottle of beer on the wall. ')
# print('1 bottle of beer on the wall, 1 bottle of beer. ')
# print('Take one down and pass it around, no more bottles of beer on the wall. ')
# print('No more bottles of beer on the wall, no more bottles of beer. ')
# print('Go to the store and buy some more, 99 bottles of beer on the wall. ')
# a, b = input().split('.')
# if b == 'dib':
# print('Paint.Picture')
# elif b == 'doc':
# print('Word.Document.8')
# elif b == 'docx':
# print('Word.Document.12')
# elif b == 'htm':
# print('htmfile')
# elif b == 'html':
# print('htmlfile')
# elif b == 'hwp':
# print('Hwp.Document.96')
# elif b == 'hwpx':
# print('Hwp.Document.hwpx.96')
# elif b == 'hwt':
# print('Hwp.Document.hwt.96')
# elif b == 'jpe':
# print('jpegfile')
# elif b == 'ppt':
# print('PowerPoint.Show.8')
# elif b == 'pptx':
# print('PowerPoint.Show.12')
# elif b == 'pptxml':
# print('powerpointxmlfile')
# elif b == 'jpeg':
# print('jpegfile')
# elif b == 'jpg':
# print('jpegfile')
a, b = map(int, input().split())
for i in range(1, 10000):
a -= (b - 1)
if(a < b):
break
print(i)