| UDESC Selection Contest 2023-2 |
|---|
| Finished |
Léo and Emanuel are ready to travel to Rio de Janeiro to watch the next football match Vasco da Gama will play, going from Joinville to Rio through the BR-101 highway. During the trip, Emanuel wondered why it was taking so long to reach the destination. They stopped to look at the map and realized they had taken the wrong route, driving in the opposite direction! They immediately stopped and turned around, returning to the correct path. Now, they want to know how many kilometers they will have traveled in total after reaching their destination. However, since they are on the road, they sent you a message asking you to write a program to calculate this for them.
Given the distance that the friends traveled in the wrong direction and the distance from the football stadium to their starting point, provide the total value, in kilometers, that the two will have traveled when they reach their destination.
The input consists of two lines, each containing a single integer value in kilometers.
The first line contains the distance $$$A$$$ $$$(1 \le A \le 10^6)$$$ that Léo and Emanuel traveled in the wrong direction. The second line contains the distance $$$B$$$ $$$(1 \le B \le 10^6)$$$ between their starting point and the destination.
Print a single integer, the answer to Léo and Emanuel's request, in kilometers.
4 2
10
5 7
17
2 4
8
1 10
12
| Name |
|---|


