You are given circular array *a*<sub class="lower-index">0</sub>, *a*<sub class="lower-index">1</sub>, ..., *a*<sub class="lower-index">*n* - 1</sub>. There are two types of operations with it: 
 -  *inc*(*lf*, *rg*, *v*) — this operation increases each element on the segment [*lf*, *rg*] (inclusively) by *v*; -  *rmq*(*lf*, *rg*) — this operation returns minimal value on the segment [*lf*, *rg*] (inclusively). 
Assume segments to be circular, so if *n* = 5 and *lf* = 3, *rg* = 1, it means the index sequence: 3, 4, 0, 1.

Write program to process given sequence of operations.
The first line contains integer *n* (1 ≤ *n* ≤ 200000). The next line contains initial state of the array: *a*<sub class="lower-index">0</sub>, *a*<sub class="lower-index">1</sub>, ..., *a*<sub class="lower-index">*n* - 1</sub> ( - 10<sup class="upper-index">6</sup> ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">6</sup>), *a*<sub class="lower-index">*i*</sub> are integer. The third line contains integer *m* (0 ≤ *m* ≤ 200000), *m* — the number of operartons. Next *m* lines contain one operation each. If line contains two integer *lf*, *rg* (0 ≤ *lf*, *rg* ≤ *n* - 1) it means *rmq* operation, it contains three integers *lf*, *rg*, *v* (0 ≤ *lf*, *rg* ≤ *n* - 1; - 10<sup class="upper-index">6</sup> ≤ *v* ≤ 10<sup class="upper-index">6</sup>) — *inc* operation.
from math import *
from collections import *
from bisect import *
import heapq
import math
import  sys


from itertools import permutations

def is_prime(n):

    for i in range(2,math.ceil(math.sqrt(n))):
        if(n%i==0):
            return False
    return True

def sieve(n):
    arr=[True for _ in range(n+1)]

    for i in range(2,math.ceil(math.sqrt(n))):
        if(arr[i]==True):
            for j in range(i*i,n+1,i):
                arr[j]=False

    return arr


def power(x, y, p):
    res = 1  # Initialize result

    # Update x if it is more
    # than or equal to p
    x = x % p

    if (x == 0):
        return 0

    while (y > 0):

        # If y is odd, multiply
        # x with result
        if ((y & 1) == 1):
            res = (res * x) % p

        # y must be even now
        y = y >> 1  # y = y/2
        x = (x * x) % p

    return res

def euclidean_distance(x1,y1,x2,y2):
    return sqrt(abs(x1-x2)**2+abs(y1-y2)**2)

def get_permutations(lo=0,hi=10):
    return list(permutations(range(lo,hi)))


def primeFactors(n):
    ans=[]
    copy=n
    while n % 2 == 0:
        ans.append(2)
        n = n // 2
    for i in range(3, int(math.sqrt(copy)) + 1, 2):
        while n % i == 0:
            ans.append(i)
            n = n // i
    if n > 2:
        return [n]+ans
    return ans


def NcR(n, r):
    p = 1
    k = 1
    if (n - r < r):
        r = n - r

    if (r != 0):
        while (r):
            p *= n
            k *= r
            m = gcd(p, k)
            p //= m
            k //= m
            n -= 1
            r -= 1
    else:
        p = 1
    return p

def getDivisors(n):
    i = 1
    ans1=[]
    ans2=[]
    while i <= math.sqrt(n):

        if (n % i == 0):
            if (n / i == i):
                ans1.append(i)
            else:
                ans1.append(i)
                ans2.append(n//i)
        i = i + 1

    return ans1+ans2[::-1]


class DisjointSet:
    def __init__(self, n):
        self.parent = [i for i in range(n + 1)]


    def find(self, s):
        if s == self.parent[s]:
            return s
        self.parent[s] = self.find(self.parent[s])
        return self.parent[s]

    def merge(self, u, v):
        self.parent[v] = u


def solve(t):

    n,k=list(map(int,input().split()))
    
    arr=list(map(int,input().split()))
    
    high = max(arr)
    lo= min(arr)
    
    block = [0 for _ in range(high+1)]
    
    for ele in arr:
        block[ele]+=1
    
    for i in range(len(block)-2,-1,-1):
        block[i]+=block[i+1]
    # block=block[::-1]
    curr_hei = high
    curr=0
    ans=0
    # print(block)
    while(curr_hei > lo):
        # print(curr_hei,curr,block[curr_hei])
        if(curr+block[curr_hei]<=k):
            curr+=block[curr_hei]
        else:
            ans+=1
            curr = block[curr_hei]
        curr_hei-=1
    
    if(curr!=0):
        ans+=1
    
    print(ans)
        
        
        
    


if __name__ == '__main__':
    n=1
    t=1
    # sys.stdin = open("C:/Users/laxmikanth reddy/Downloads/codeforces/input.txt", 'r')
    # n=int(input())
    while(n):
        n-=1
        solve(t)
        t+=1




