Ah I see. I believe they take into account all the attempts for a particular class, but you would want to ask admissions to be sure. If you are deciding whether to apply to the master's program here, I would treat it like a medical school application and be sure to explain any grade or grade trend deficits.
I am also in the Master's program this year, so if you have any questions about the program itself, I'd be happy to help! Like I said earlier though, it's best to email the admissions team and find out for sure about the grade replacement.