#include <bits/stdc++.h>
using namespace std;

int main(){
  int r,g;
  double p;
  cin >> r >> g;
  //g = (r + p) / 2
  p = 2 * g - r;
  cout << p << endl;
}
  
#include <iostream>
using namespace std;

int main(int argc, char **argv) {
  int x, y;
  cin >> x;
  y = x * x * x;
  cout << y << endl;
}