Sorry, that is not right.
If you were without insurance for 2 months or less, there would be no penalty. If you were without insurance for 3 or more months (however, if you had insurance for at least 1 day in a month, that counts as an insured month), the penalty applies to all months, unless you qualify for an exemption.
https://www.healthcare.gov/health-coverage-exemptions/exemptions-from-the-fee/