#include<iostream>
using namespace std;
int main()
{
    short n1,n2,k;
    char c1,c2;
    cin>>n1>>c1>>n2>>c2>>k;
    cout<<n1<<c1<<n2<<c2<<k;
    /*if(c1=='A')
    {
        if(k>n1)
        {
            cout<<n1;
        }
        else if(k<=n1)
        {
            cout<<k;
        }
    }

    if(c1=='B')
    {
        if(n1>k)
        {
            cout<<0;
        }
        else if(k>n1)
        {
            cout<<k-n1;
        }
   */ //}
    return 0;
}
