#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main(void){
  int n, r;
  cin >> n >> r;
  if(n < 10) cout << r+100*(10-n) << endl;
  else cout << r << endl;
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {

	string s; int w; cin >> s >> w;
	string ans = "";
	for (int i = 0; i < s.size(); i+=w) {
		ans += s[i];
	}
	cout << ans << endl;
    return 0;
}