Mary gives 1/4 * 400 = <<400*1/4=100>>100 sheep to her sister.
She now has 400 - 100 = <<400-100=300>>300 sheep remaining.
She then gives 1/2 * 300 = <<300/2=150>>150 sheep to her brother.
So 300 - 150 = <<300-150=150>>150 sheep remain.
#### 150