#include #include using namespace std; using ll = long long; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) using mint = atcoder::modint998244353; int main(){ ll c,y; cin>>c>>y; if(c*100>y){ cout<<"can't exchange\n"; return 0; } ll nc=(y%500)/100; if(nc>=c){ cout<<"no exchange\n"; return 0; } cout<<((c-nc+4)/5)*5+nc<