3 5 6 8 9 错了
#include <iostream>
using namespace std;
int main()
{
int x, n;
cin >> x >> n;
int a = x + n;
int b = a / 7;
int c = a % 7;
int s,d;
{if (c!=6)
d = 0;
else if (c == 6)
d = 1;
}
{if (x >= 1 && x <= 6)
s = n + 1 - 2 * b - d;
else
s = n + 1 - (2 * b - 1) - d;
}
int r = 250 * s;
cout << r << endl;
return 0;
}