res = 0
S = int(input())
price = int(input())
empty = int(input())
while S - price >= 0 :
k = S // price
res += k
S = S % price + k * empty
print(res)
res = 0
S = int(input())
price = int(input())
empty = int(input())
while S - price >= 0 :
k = S // price
res += k
S = S % price + k * empty
print(res)