#include <stdio.h> int main() { int a, b,c; while (scanf("%d %d", &a, &b) != EOF) { c=b+(b-a); printf("%d\n", c); } return 0; }