#include #define MOSTAFAOSMAN() ios_base::sync_with_stdio(false);cout.tie(NULL),cin.tie(NULL); #define ll long long #define ld long double #define outCondtion(a) cout<<((a)?"YES":"NO")<<"\n"; #define tloop int t;cin>>t;cin.ignore();while(t--) #define endl "\n" #define inf 0x3f3f3f3f3f3f3f3fLL #define debug(x) cout<<"debug "<<(#x)<<": "<> n; int ans = n / 500; n %= 500; if (n >= 100) { ++ans; } cout << ans << endl; } signed main() { MOSTAFAOSMAN() solve(); return 0; }