Submission

Status:

--------------------

Subtask/Task Score:

0/100

Score: 0

User: thanat

Problemset: Slowly Express

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-05 21:16:53

#include<iostream>
using namespace std;
int main(){
	int a,b,c;
	b=0;
	while(true){
		cin>>a;
		if(a<0){
			break;
		}
		else{
			if(a<500){
				cout<<"0";
				return 0;
			}
			while(a>=500){
				a=a-800;
				b=b+1;
			}
			cout<<b<<"\n";
		}
	}
}