#include <stdio.h>

int main() {
     int a,b,d;
     scanf("%d%d",&a,&b);
     d = b-a;
     printf("%d",a+(3-1)*d);
}