Ivan has a robot which is situated on an infinite grid. Initially the robot is standing in the starting cell (0, 0). The robot can process commands. There are four types of commands it can perform:

  * U — move from the cell (x, y) to (x, y + 1); 
  * D — move from (x, y) to (x, y - 1); 
  * L — move from (x, y) to (x - 1, y); 
  * R — move from (x, y) to (x + 1, y). 



Ivan entered a sequence of n commands, and the robot processed it. After this sequence the robot ended up in the starting cell (0, 0), but Ivan doubts that the sequence is such that after performing it correctly the robot ends up in the same cell. He thinks that some commands were ignored by robot. To acknowledge whether the robot is severely bugged, he needs to calculate the maximum possible number of commands that were performed correctly. Help Ivan to do the calculations!

Input

The first line contains one number n — the length of sequence of commands entered by Ivan (1 ≤ n ≤ 100).

The second line contains the sequence itself — a string consisting of n characters. Each character can be U, D, L or R.

Output

Print the maximum possible number of commands from the sequence the robot could perform to end up in the starting cell.

Examples

Input

4
LDUR


Output

4


Input

5
RRRUU


Output

0


Input

6
LLRRRR


Output

4
import java.io.*;
import java.util.*;
import java.util.Map.Entry;
import java.lang.Math;
import java.math.BigInteger;

public class Problem {
	
	void solve() throws IOException {
		int n = rI();
		
		char[] s = rS().toCharArray();
		int x=0;
		int y = 0;
		int ans = 0;
		int curAns = 0;
		for(int i=0;i<n;++i){
			if(s[i]=='L'){
				x--;
			}else if(s[i]=='R'){
				x++;
			}else if(s[i]=='U'){
				y++;
			}else if(s[i]=='D'){
				y--;
			}
			
		}
		
		out.println(n-Math.abs(x)-Math.abs(y));
	}
	
	
	class SegmentTree{
		int[] t;
		
		SegmentTree(int[] a, int n){
			t = new int[4*n];
			build(a, 1, 1, n);
		}
		
		void build(int[] a, int v, int tl, int tr){
			if(tl==tr){
				t[v] = a[tl]; return;
			}
			
			int tm = (tl+tr)/2;
			build(a, 2*v, tl, tm);
			build(a, 2*v+1, tm+1, tr);
			t[v] = Math.min(t[2*v], t[2*v+1]);
		}
		
		void update(int v, int tl, int tr, int pos, int value){
			if(tl==tr){
				t[v] = value; return;
			}
			int tm = (tl+tr)/2;
			if(pos<=tm){
				update(2*v, tl, tm, pos, value);
			}else{
				update(2*v+1, tm+1, tr, pos, value);
			}
			
			t[v] = Math.min(t[2*v], t[2*v+1]);
		}
		
		int getMin(int v, int tl, int tr, int l, int r){
			if(l>r){
				return INF;
			}
			if(tl==l&&tr==r){
				return t[v];
			}
			
			int tm = (tl+tr)/2;
			
			int min1 = getMin(2*v, tl, tm, l, Math.min(tm, r));
			int min2 = getMin(2*v+1, tm+1, tr, Math.max(l, tm+1), r);
			
			return Math.min(min1, min2);
		}
	}
	
	
	int checkBit(int mask, int bit) {
		return (mask >> bit) & 1;
	}

	public static void main(String[] args) throws IOException {

		new Problem().run();
	}

	boolean isLower(char a) {
		return ((int) a) >= 97 ? true : false;
	}

	int INF = Integer.MAX_VALUE - 12345;

	int[][] STEPS = { { 0, 1 }, { 1, 0 }, { -1, 0 }, { 0, -1 } };

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;
	Random rnd = new Random();
	static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	Problem() throws FileNotFoundException {
		
		try{
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}catch(Exception e){
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		}
		
		tok = new StringTokenizer("");
	}

	long checkBit(long mask, int bit) {
		return (mask >> bit) & 1;
	}

	// ======================================================

	// ======================================================
	void run() throws IOException {
		solve();
		out.close();
	}

	char[] reverseCharArray(char[] arr) {
		char[] ans = new char[arr.length];
		for (int i = 0; i < arr.length; ++i) {
			ans[i] = arr[arr.length - i - 1];
		}
		return ans;
	}

	int sqrt(double m) {
		int l = 0;
		int r = 1000000000 + 9;
		int i = 1000;
		while (r - l > 1) {
			int mid = (r + l) / 2;
			if (mid * mid > m) {
				r = mid;
			} else {
				l = mid;
			}
		}
		return l;
	}
	
	int countPow(int m, int n) {
		int ans = 0;
		while (m % n == 0 && m > 0) {
			ans++;
			m /= n;
		}
		return ans;
	}

	long binPow(long a, long b) {
		if (b == 0) {
			return 1;
		}
		if (b % 2 == 1) {
			return a * binPow(a, b - 1);
		} else {
			long c = binPow(a, b / 2);
			return c * c;
		}

	}

	int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	long pow(long x, long k) {
		long ans = 1;
		for (int i = 0; i < k; ++i) {
			ans *= x;
		}
		return ans;
	}
	
	class Fenwik{
		private long[] t;
		private int length;
		
		Fenwik(int[] a){
			this.length = a.length+100;
			this.t = new long[length];
			for(int i=0;i<a.length;++i){
				this.inc(i, a[i]);
			}
		}
		
		void inc(int i, int delta){
			for(; i<this.length; i=i|(i+1)){
				this.t[i] += delta;
			}
		}
		
		long getSum(int r){
			long sum = 0;
			
			for(;r>=0;r=(r&(r+1))-1){
				sum+= this.t[r];
			}
			
			return sum;
		}
	}
	
	// ////////////////////////////////////////////////////////////////////

	String delimiter = " ";

	String readLine() throws IOException {
		return in.readLine();
	}

	String rS() throws IOException {
		while (!tok.hasMoreTokens()) {
			String nextLine = readLine();
			if (null == nextLine)
				return null;

			tok = new StringTokenizer(nextLine);
		}

		return tok.nextToken(delimiter);
	}

	int rI() throws IOException {
		return Integer.parseInt(rS());
	}

	long rL() throws IOException {
		return Long.parseLong(rS());
	}

	double rD() throws IOException {
		return Double.parseDouble(rS());
	}

	int[] rA(int b) {
		int a[] = new int[b];
		for (int i = 0; i < b; i++) {
			try {
				a[i] = rI();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return a;
	}

	int[] readSortedIntArray(int size) throws IOException {
		Integer[] array = new Integer[size];

		for (int index = 0; index < size; ++index) {
			array[index] = rI();
		}
		Arrays.sort(array);

		int[] sortedArray = new int[size];
		for (int index = 0; index < size; ++index) {
			sortedArray[index] = array[index];
		}

		return sortedArray;
	}

	int[] sortedIntArray(int size, int[] array) throws IOException {
		for (int index = 0; index < size; ++index) {
			array[index] = rI();
		}
		Arrays.sort(array);

		int[] sortedArray = new int[size];
		for (int index = 0; index < size; ++index) {
			sortedArray[index] = array[index];
		}

		return sortedArray;
	}
}