In a bag which contains 40 balls, there are 18 red balls and some green and blue balls. If two balls are picked up from the bag without replacement, then the probability of the first ball being red and second being green is 3/26. Find the number of blue balls in the bag.