In order to make the "Sea Battle" game more interesting, Boris decided to add a new ship type to it. The ship consists of two rectangles. The first rectangle has a width of w_1 and a height of h_1, while the second rectangle has a width of w_2 and a height of h_2, where w_1 ≥ w_2. In this game, exactly one ship is used, made up of two rectangles. There are no other ships on the field.

The rectangles are placed on field in the following way:

  * the second rectangle is on top the first rectangle; 
  * they are aligned to the left, i.e. their left sides are on the same line; 
  * the rectangles are adjacent to each other without a gap. 



See the pictures in the notes: the first rectangle is colored red, the second rectangle is colored blue.

Formally, let's introduce a coordinate system. Then, the leftmost bottom cell of the first rectangle has coordinates (1, 1), the rightmost top cell of the first rectangle has coordinates (w_1, h_1), the leftmost bottom cell of the second rectangle has coordinates (1, h_1 + 1) and the rightmost top cell of the second rectangle has coordinates (w_2, h_1 + h_2).

After the ship is completely destroyed, all cells neighboring by side or a corner with the ship are marked. Of course, only cells, which don't belong to the ship are marked. On the pictures in the notes such cells are colored green.

Find out how many cells should be marked after the ship is destroyed. The field of the game is infinite in any direction.

Input

Four lines contain integers w_1, h_1, w_2 and h_2 (1 ≤ w_1, h_1, w_2, h_2 ≤ 10^8, w_1 ≥ w_2) — the width of the first rectangle, the height of the first rectangle, the width of the second rectangle and the height of the second rectangle. You can't rotate the rectangles.

Output

Print exactly one integer — the number of cells, which should be marked after the ship is destroyed.

Examples

Input


2 1 2 1


Output


12


Input


2 2 1 2


Output


16

Note

In the first example the field looks as follows (the first rectangle is red, the second rectangle is blue, green shows the marked squares):

<image>

In the second example the field looks as:

<image>

/*
9 2
        1 1 1 1 1 0 0 0 0
        1 2
        1 5
        5 6
        5 7
        2 3
        2 4
        3 8
        3 9
*/




import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class Question{


    static LinkedList<Integer> adj[] ;
    static boolean[] visited;
    static boolean[] visited_;
    static int[] ans;
    static int count_ = 0;
    public static  void main(String[] args) throws IOException {
        Reader.init(System.in);
        int w1 = Reader.nextInt();
        int h1 = Reader.nextInt();
        int w2 = Reader.nextInt();
        int h2 = Reader.nextInt();
        System.out.println(2*(w1 + h1 + h2) + 4);
        






    }


    static int binarySearchCount(long arr[], int n, long key,int left)
    {
        int right = n;

        int mid = 0;
        while (left < right) {
            mid = (right + left) >> 1;

            // Check if key is present in array
            if (arr[mid] == key) {

                // If duplicates are present it returns
                // the position of last element
                while (mid+1<n && arr[mid + 1] == key)
                    mid++;
                break;
            }

            // If key is smaller, ignore right half
            else if (arr[mid] > key)
                right = mid;

                // If key is greater, ignore left half
            else
                left = mid + 1;
        }

        // If key is not found in array then it will be
        // before mid
        while (mid > - 1 && arr[mid] > key)
            mid--;

        // Return mid + 1 because of 0-based indexing
        // of array
        return mid + 1;
    }

    static long gcd(long a, long b)
    {
        if (b == 0)
            return a;
        return gcd(b, a % b);

    }

    // method to return LCM of two numbers
    static long lcm(long a, long b)
    {
        return (a*b)/gcd(a, b);
    }

    static long fun(long n){
        long max = -1;
        for (int i = 0 ; i < n ; i++){
            String x = Integer.toString(i);
            long product = 1;
            for (int j = 0 ; j < x.length() ; j++){
                product = product * Long.parseLong(Character.toString(x.charAt(j)));
            }
            max = Math.max(product,max);
        }
        return max;
    }

    public static void print2D(int mat[][])
    {
        // Loop through all rows
        for (int[] row : mat)

            // converting each row as string
            // and then printing in a separate line
            System.out.println(Arrays.toString(row));
    }




}



class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}

class MergeSort {
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r) {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int[n1];
        int R[] = new int[n2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
            L[i] = arr[l + i];
        for (int j = 0; j < n2; ++j)
            R[j] = arr[m + 1 + j];


        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i] <= R[j]) {
                arr[k] = L[i];
                i++;
            } else {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r) {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }

    /* A utility function to print array of size n */
    static void printArray(int arr[]) {
        int n = arr.length;
        for (int i = 0; i < n; ++i)
            System.out.print(arr[i] + " ");
        System.out.println();
    }

    static long phi(long n,long R)
    {

        long result = R;


        for (long p = 2; p * p <= n; ++p)
        {


            if (n % p == 0)
            {


                while (n % p == 0)
                    n =n/p;
                result =result - ( result / p);
            }
        }


        //System.out.println("n" + n);
        if (n > 1)
            result -= result / n;
        return result;
    }
}

class person{
    int index;
    int money;

    public person(int index, int money) {
        this.index = index;
        this.money = money;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public int getIndex() {
        return index;
    }

    public int getMoney() {
        return money;
    }
}

class StudentComparator implements Comparator<person>{

    // Overriding compare()method of Comparator
    // for descending order of cgpa
    public int compare(person s1, person s2) {
        if (s1.money > s2.money)
            return 1;
        else if (s1.money < s2.money) {
            return -1;
        }
        else{
            if (s1.index >s2.index){
                return 1;
            }
            else{
                return -1;
            }
        }

    }
}

