#include<iostream>
using namespace std;
const int N=1005;
int main(){
int t,r=0,k[N];
while(cin>>t){
int mi=30*N,s;
for(int i=0;i<r;i++){
if(t<=k[i]){
if(mi>k[i]-t){
mi=k[i]-t;
s=i;
}
}
}
if(mi<30*N)k[s]=t;
else k[r++]=t;
}
cout<<r;
return 0;
}
04-01
5147
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-09
1563
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)