This page is still under construction.

Parts of this page are still being built. What you see may change.

Four Numbers

Time limit1sMemory limit256 MB

Summary
Add the two numbers formed by writing B directly after A and D directly after C.
Level

Easy2 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

You are given four natural numbers AA, BB, CC, DD. Write a program that computes the sum of the number formed by joining AA and BB and the number formed by joining CC and DD.

Joining two numbers means writing the second one directly after the first one, digit for digit. For example, joining 2020 and 3030 gives 20302030.

Input

The first line contains four natural numbers AA, BB, CC, DD, separated by spaces. (1≤A,B,C,D≤1,000,0001 \le A, B, C, D \le 1{,}000{,}000)

Output

Print, on one line, the sum of the number formed by joining AA and BB and the number formed by joining CC and DD.

Examples3

  1. Example 1

    Input
    10 20 30 40
    
    Expected output
    4060
    
  2. Example 2

    Input
    1 2 3 4
    
    Expected output
    46
    
  3. Example 3

    Input
    1 1 1 1
    
    Expected output
    22