#include<bits/stdc++.h>
using namespace std;
int book[1001];
int main()
{
freopen("live.in","r",stdin);
freopen("live.out","w",stdout);
int n,w,num,p;
cin>>n>>w;
double d=w/100.0;
for (int i=1;i<=n;++i)
{
cin>>num;++book[num];
p=max(1,(int)(floor(d*i)));
int j;
for (j=600;j>=0&&p>0;--j) p-=book[j];
++j;
cout<<j<<' ';
}
return 0;
}