<commit_before>n, I = map(int, input().split())
a = list(map(int, input().split()))

k = (8 * I) // n
K = 1
for _ in range(k):
    K *= 2
    if K > n:
        K = n
        break

values = {}
for ai in a:
    if ai not in values.keys():
        values[ai] = 0
    values[ai] += 1

sorted_values = sorted(values.items(), key=lambda kv: kv[1], reverse=True)
print(n - sum([v for _, v in sorted_values[:K]]))<commit_msg>Fix: interval of K values, not K most frequent values<commit_after>n, I = map(int, input().split())
a = list(map(int, input().split()))

k = (8 * I) // n
K = 1
for _ in range(k):
    K *= 2
    if K > n:
        K = n
        break

values = {}
for ai in a:
    if ai not in values.keys():
        values[ai] = 0
    values[ai] += 1

sorted_values = sorted(values.items())

K_sum = sum([v for _, v in sorted_values[:K]])
max_K_sum = K_sum
for i in range(K, len(sorted_values)):
    decr = sorted_values[i-K][1]
    incr = sorted_values[i][1]
    K_sum -= decr
    K_sum += incr
    max_K_sum = max(max_K_sum, K_sum)

print(n - max_K_sum)
{'fraction_non_alphanumeric': 0.16872037914691942, 'fraction_numerical': 0.012322274881516588, 'mean_word_length': 2.6539792387543253, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5971285', 'n_tokens_mistral': 424, 'n_tokens_neox': 416, 'n_words': 124}