Reuben invested his savings in two investment funds. The $18,000 that he invested in Fund A returned a 5% profit. The amount that he invested in Fund B returned a 1% profit. How much did he invest in Fund B, if both funds together returned a 4% profit?