#include<stdio.h>
int main(){
	int n, r, t;
	scanf("%d %d", &n, &r);
	t = 100 * (10 - n);
	if(n<10){
		printf("%d\n", r+t);
	}
	else{
		printf("%d\n", r);
	}
	return 0;
}

#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>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;



int main() {
    int n, k;
    cin >> n >> k;
    if (n%k != 0) cout << 1 << endl;
    else cout << 0 << endl;
    return 0;
}