#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,w;
cin>>n>>w;
int cnt[1000]={0};
for (int i=1;i<=n;i++)
{
int momo;
cin>>momo;
cnt[momo]++;
int people=max(1,(i*w)/100);
int sum=0;
int line=600;
while(line>=0 && sum<people)
{
sum+=cnt[line];
line--;
}
cout<<line+1<<" ";
}
return 0;
}