OP, You can enter Thailand visa exempt and receive a 60 day stamp.
Be aware that airline at departure may ask for an onward/return flight.
My guess is that with the short visit (eg 40 days) you will have a return ticket.
Note: Jetstar almost always require flight out of Thailand..