Problem: You are given two strings s and t. In a single move, you can choose any of two strings and delete the first (that is, the leftmost) character. After a move, the length of the string decreases by 1. You can't choose a string if it is empty.

For example:

  * by applying a move to the string "where", the result is the string "here", 
  * by applying a move to the string "a", the result is an empty string "". 



You are required to make two given strings equal using the fewest number of moves. It is possible that, in the end, both strings will be equal to the empty string, and so, are equal to each other. In this case, the answer is obviously the sum of the lengths of the initial strings.

Write a program that finds the minimum number of moves to make two given strings s and t equal.

Input

The first line of the input contains s. In the second line of the input contains t. Both strings consist only of lowercase Latin letters. The number of letters in each string is between 1 and 2⋅10^5, inclusive.

Output

Output the fewest number of moves required. It is possible that, in the end, both strings will be equal to the empty string, and so, are equal to each other. In this case, the answer is obviously the sum of the lengths of the given strings.

Examples

Input

test
west


Output

2


Input

codeforces
yes


Output

9


Input

test
yes


Output

7


Input

b
ab


Output

1

Note

In the first example, you should apply the move once to the first string and apply the move once to the second string. As a result, both strings will be equal to "est".

In the second example, the move should be applied to the string "codeforces" 8 times. As a result, the string becomes "codeforces" → "es". The move should be applied to the string "yes" once. The result is the same string "yes" → "es".

In the third example, you can make the strings equal only by completely deleting them. That is, in the end, both strings will be empty.

In the fourth example, the first character of the second string should be deleted.

Solution (in JAVA):

Solution:
//package practice;
import java.util.*;
import java.io.*;


public class Practice {
    

    
    
    public static void main(String args[])
    { 
      InputReader in=new InputReader(System.in);
      //String s=in.next();
      //String t=in.next();
      StringBuilder s=new StringBuilder();
      StringBuilder t=new StringBuilder();
      s.append(in.next());
      t.append(in.next());
      
      s=s.reverse();
      t=t.reverse();
      //System.out.print(s);
      boolean trr=false;
      
      br:
      for(int i=0;i<Math.min(s.length(),t.length());i++)
      {
            if(s.charAt(i)!=t.charAt(i))
              {
                  System.out.println(s.length()-i+t.length()-i);
                  trr=true;
                  break br;
              }
        
      }
      if(!trr){
         
          if(s.length()<t.length())
          {
              System.out.println(t.length()-s.length());
          }
          else
               {
              System.out.println(s.length()-t.length());
          }
      
      
      }
      
    }
    
    
    
 static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
 
        public InputReader(InputStream stream) {
            this.stream = stream;
        }
 
        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
 
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            
 
            return buf[curChar++];
        }
 
        public int nextInt() {
            int c = read();
 
            while (isSpaceChar(c))
                c = read();
 
            int sgn = 1;
 
            if (c == '-') {
                sgn = -1;
                c = read();
            }
 
            int res = 0;
 
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
 
                res *= 10;
                res += c & 15;
 
                c = read();
            } while (!isSpaceChar(c));
 
            return res * sgn;
        }
 
        public int[] nextIntArray(int arraySize) {
            int array[] = new int[arraySize];
 
            for (int i = 0; i < arraySize; i++)
                array[i] = nextInt();
 
            return array;
        }
 
        public long nextLong() {
            int c = read();
 
            while (isSpaceChar(c))
                c = read();
 
            int sign = 1;
 
            if (c == '-') {
                sign = -1;
 
                c = read();
            }
 
            long result = 0;
 
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
 
                result *= 10;
                result += c & 15;
 
                c = read();
            } while (!isSpaceChar(c));
 
            return result * sign;
        }
 
        public long[] nextLongArray(int arraySize) {
            long array[] = new long[arraySize];
 
            for (int i = 0; i < arraySize; i++)
                array[i] = nextLong();
 
            return array;
        }
 
        public float nextFloat() // problematic
        {
            float result, div;
            byte c;
 
            result = 0;
            div = 1;
            c = (byte) read();
 
            while (c <= ' ')
                c = (byte) read();
 
            boolean isNegative = (c == '-');
 
            if (isNegative)
                c = (byte) read();
 
            do {
                result = result * 10 + c - '0';
            } while ((c = (byte) read()) >= '0' && c <= '9');
 
            if (c == '.')
                while ((c = (byte) read()) >= '0' && c <= '9')
                    result += (c - '0') / (div *= 10);
 
            if (isNegative)
                return -result;
 
            return result;
        }
 
        public double nextDouble() // not completely accurate
        {
            double ret = 0, div = 1;
            byte c = (byte) read();
 
            while (c <= ' ')
                c = (byte) read();
 
            boolean neg = (c == '-');
 
            if (neg)
                c = (byte) read();
 
            do {
                ret = ret * 10 + c - '0';
            } while ((c = (byte) read()) >= '0' && c <= '9');
 
            if (c == '.')
                while ((c = (byte) read()) >= '0' && c <= '9')
                    ret += (c - '0') / (div *= 10);
 
            if (neg)
                return -ret;
 
            return ret;
        }
 
        public String next() {
            int c = read();
 
            while (isSpaceChar(c))
                c = read();
 
            StringBuilder res = new StringBuilder();
 
            do {
                res.appendCodePoint(c);
 
                c = read();
            } while (!isSpaceChar(c));
 
            return res.toString();
        }
 
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
 
        public String nextLine() {
            int c = read();
 
            StringBuilder result = new StringBuilder();
 
            do {
                result.appendCodePoint(c);
 
                c = read();
            } while (!isNewLine(c));
 
            return result.toString();
        }
 
        public boolean isNewLine(int c) {
            return c == '\n';
        }
 
        public void close() {
            try {
                stream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
 
    }
    
}