When Elias Musk was born, his father's first words were, "My son will be a computer engineer." After completing college, Elias started his B.Sc. in CSE at MIT (Mohanlal Institute of Technology) to pursue his father's dream and his career. During that time, he stayed in the university's dormitory.
One night, his roommate told him that one of the tech giant companies had developed and launched an AI chat-bot, a conversational generative artificial intelligence. This invention could answer with high accuracy and solve complex algorithmic problems. After hearing that, Elias started to panic because it was his final-year project idea.
After conducting some research, he discovered that this invention could not solve simple mathematical problems. So, he decided to modify his project to focus on developing a solution for solving such problems. However, he needed a break to clear his mind, so he decided to go to the rooftop of the dormitory for some fresh air. He was also highly conscious about not wasting time.
He was thinking how much time it would take to reach the rooftop of the building. He knew that the dormitory has floors, and he was currently on the floor. Additionally, there were steps between any two floors, and climbing one step took seconds.
You heard about the above incident from one of Elias's friends. Now, write a program to calculate the time Elias will take to reach the rooftop.
The single line of input contains three integers , and — denoting the total number of floors, the floor Elias is on and number of steps on the stairs between any two floors.
Output a single integer, the total time to reach the rooftop.
Input | Output |
---|---|
4 2 5 | 30 |
Input | Output |
---|---|
20 12 8 | 144 |