If you exit and enter on the 29th December 2017, you will be allowed to stay until the 27th February 2018. On the 26th February 2018 you could get an extention of stay for 1'900 THB at an immigration office which would allow you to stay until 29th March 2018 at the most.