You are given the number of legs of three types of animals:
an inaccurate depiction of the problem background
- Chickens $-$ each of which has 2 legs
- Rabbits $-$ each of which has 4 legs
- Spiders $-$ each of which has 8 legs
Your goal is to write a program that computes the total number of legs among all the animals.
Input
A single line with three non-negative integers $c, r, s$.
- $c$ $-$ the number of chickens
- $r$ $-$ the number of rabbits
- $s$ $-$ the number of spiders
Output
Print a single integer $-$ the total number of legs among all the animals.
Constraints
For all cases, $0\le c, r, s\le 1000$.
Sample Test Cases
| Input | Output | |
|---|---|---|
| 3 2 1 | 22 |
Scoring: Per Subtask
Authored by hclee
Appeared in 2025 Wah Yan Interschool Olympiad in Informatics 🤯🥷⚡🧠🏆