P26368 [AtCoder] Turtle and Crane Calculation
普及
题目描述

Problem Description

Turtles have 4 legs, and cranes have 2 legs.

When there are $ A $ turtles and $ B $ cranes, how many legs are there in total?

Input Format

The input is given from the standard input in the following format:

$ A $ $ B $

  • The first line contains two integers $A\ (1\ ≦\ A\ ≦\ 1000),\ B\ (1\ ≦\ B\ ≦\ 1000)$ separated by a space. This indicates that there are $ A $ turtles and $ B $ cranes.

Output Format

Output the total number of legs in one line.

Sample Input and Output

Sample Input #1

20 14

Sample Output #1

108

Sample Input #2

296 415

Sample Output #2

2014

Notes/Hints

Sample Explanation 1

The total number of legs of the turtles is $4\ \times\ 20\ =\ 80$, and the total number of legs of the cranes is $2\ \times\ 14\ =\ 28$. Therefore, the total number of legs is $ 108 $.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
20 14
样例输出
108