Heart beating 140

Came in to the hospital because I had a bad cough that was causing alot of pain. They couldn't do anything about that but checked for other issues and noticed my heart is beating at 140 for a healthy 17 year old. Now they are keeping me in hospital and all I want to do is go home :(