Probability problem - Medium