• + 0 comments

    rd,rm,ry=map(int,input().split()) dd,dm,dy=map(int,input().split()) t=0 if ry>dy: t+=10000 elif ry==dy: if rm>dm: t+=((rm-dm)*500) elif rm==dm: if rd>dd: t+=((rd-dd)*15) print(t)