https://www.acmicpc.net/problem/3046
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int r=sc.nextInt();
int s=sc.nextInt();
System.out.format("%d",2*s-r);
}
}