#coding: utf-8 nums=list(map(int,input().split())) ans=nums[0]*2-(nums[0]-nums[1]) print (ans)