You can leave whenever you like but you are liable up until the end of the two month period unless the landlord replaces you with another tenant.
If the landlord does then you are released as soon as another tenant takes over.
Can I clarify anything for you?
Then you are not liable. Your liability ends when you can no longer live in the property if you chose.
No. You are liable until you can no longer live in the property.