There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [duration_i, lastDay_i] indicate that the ith course should be taken continuously for duration_i days and must be finished before or on lastDay_i.
You will start on the 1st day and you cannot take two or more courses simultaneously.
Return the maximum number of courses that you can take.