Economy contracts for first time since 2012