q=input().split() a=q[0] b=q[1] c=q[2] d=q[3] a=int(a) b=int(b) c=int(c) d=int(d) print((c*10+d)//(a*10+b))