import java.util.Scanner;

public class Main {
	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {
		int n = scanner.nextInt(), x = scanner.nextInt(), tmp = 0;
		System.out.println(n * 2 + x);
	}
}
