Everyone has a bad night of sleep once in a while, that's why caffeine was invented. But how long can you get away with substituting "coffee" for "sleep" and get away with it?

ThinkStock

As it turns out, relying on your daily cup of joe might not work for you.

A new study found that caffeine will keep you awake and alert after two straight nights where you sleep for five hours or less. But if you have three bad nights of sleep in a row or more no amount of caffeine will make you sharp, unfortunately.

Read more at Daily Mail.