A barn with a flat roof is rectangular in shape, $10$ yd. wide, $13$ yd. long, and $5$ yd. high. It is to be painted inside and outside, and on the ceiling, but not on the roof or floor. What is the total number of square yards to be painted?

Let's think step by step and output the final answer within \boxed{}.
user