int main() { int x,n,i=0,m=0; scanf("%d %d",&x,&n); while(i<n){ i++; if((i+x)%6==0||(i+x)%7==0){ }else{ m=m+250; } } printf("%d",m); return 0; }