import sys sys.setrecursionlimit(1000000000) # # Solution Template for Melody # # Australian Informatics Olympiad 2021 # # This file is provided to assist with reading of input and writing of output # for the problem. You may modify this file however you wish, or # you may choose not to use this file at all. # # N is the number of notes. N = 0 # K is the largest number which could be a note. K = 0 # S contains the sequence of notes forming the song. S = [] answer = 0 # Read the value of N and K. N, K = map(int, input().strip().split()) # Read each note in the song. S = [int(input().strip()) for i in range(N)] # TODO: This is where you should compute your solution. Store the smallest # possible number of notes Melody can change so that her song is nice into the # variable answer. # Write the answer. print(answer)