Consider the following two sentences:

1. If you do not study, you will fail the exam.
2. If you do not study, **then** you will fail the exam.

I know that the first sentence is preferred over the second one. The word "**then**" is a redundant word in the second sentence. But my question is: does that make the second sentence grammatically incorrect?