c
#include <stdio.h>
int main()
{
int x,y,s;
scanf("%d%d",&x,&y);
if(x>y)
s=5000-50*y-50*(100-x);
else if(x<y)
s=5000-50*x-50*(100-y);
else
s=0;
printf("%d",s);
return 0;}
#include <stdio.h>
int main()
{
int x,y,s;
scanf("%d%d",&x,&y);
if(x>y)
s=5000-50*y-50*(100-x);
else if(x<y)
s=5000-50*x-50*(100-y);
else
s=0;
printf("%d",s);
return 0;}