It is optimal for students to use umbrellas, move to the SciCom Building, and then have one student return with umbrellas, repeating this process. Simulating this will yield the answer.
If and , it is impossible for all students to cross to the SciCom Building, so the output should be .