#include<bits/stdc++.h>
using namespace std;
int n,w,sc[601],scn;//scn表示当前读入的成绩
int main()
{
freopen("live.in","r",stdin);
freopen("live.out","w",stdout);
scanf("%d%d",&n,&w);
int cnt=1;
for(int i=1;i<=n;i++)
{
scanf("%d",&scn);
sc[scn]++;
cnt=max(cnt,i*w/100);
int q=cnt;
for(int j=600;j>=0;j--)
{
if(q<=0)
{
printf("%d ",j+1);
break;
}
q-=sc[j];
}
}
printf("\n");
return 0;
}