According to the question the figure is shown below:-
The angle between velocity of wind and opposite of velocity of boat is (90 + 45) = 135 degree.
Using geometry,
Thus
So the flag will be just 0.11 degree from the perfect east direction.