#include <iostream>
#include <vector>
#include <map>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
map<int, int> count;
for (int i = 0; i < n; i++) {
count[a[i]]++;
}
int maxCount = 0;
int maxCountCount = 0;
for (auto it = count.begin(); it != count.end(); it++) {
if (it->second > maxCount) {
maxCount = it->second;
maxCountCount = 1;
} else if (it->second == maxCount) {
maxCountCount++;
}
}
if (maxCount >= (n + 1) / 2) {
cout << "pigstd" << endl;
return 0;
}
if (k >= 1) {
cout << "pigstd"<< endl;
return 0;
}
if (maxCount + k >= (n + 1) / 2) {
cout << 1 << endl;
return 0;
}
cout << maxCountCount << endl;
return 0;
}