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

#define LL long long

int main() {
    ios::sync_with_stdio(0), cin.tie(0);
    
    char c, d; cin >> c >> d;
    if(c == 'Y') if(d >= 97) d -= 32;
    cout << d;    
}
#include<bits/stdc++.h>
#define FastRead                      \
                                    ios_base::sync_with_stdio(false); \
                                    cin.tie(0);
#define ll long long
#define endl "\n"
#define f for
#define ml ll t,g; cin>>t; f(g=0;g<t;g++)
#define pi acos(-1)
using namespace std;
bool cmp(const pair<string,ll> &a,
         const pair<string,ll> &b)
{
    if(a.second!=b.second)
        return (a.second > b.second);
    else
        return (a.first < b.first);
}
int main()
{
    FastRead
   ll a,b;
   cin>>a>>b;
   cout<<((2*a)+100)-b;
    return 0;
}


