A heat engine is involved with exchange of heat of 1915 J,−40 J,+125 J and −Q J, during one cycle achieving an efficiency of 50.0%. The value of Q is