Given an integer N denoting the Length of a line segment. you need to cut the line segment in such a way that the cut length of a line segment each time is integer either x , y or z. and after performing all cutting operation the total number of cutted segments must be maximum.
First line of input contains of an integer 'T' denoting number of test cases. First line of each testcase contains N . Second line of each testcase contains 3 space separated integers x , y and z.
For each test case print in a new line an integer corresponding to the answer .
2 1 1
5 3 2
In first test case, total length is 4, and cut lengths are 2, 1 and 1. We can make maximum 4 segments each of length 1. In secon test case, we can make two segments of lengths 3 and 2.