// editor1
#include <iostream>
#include <string>
using namespace std;

class Customer
{
    void displayname(string s)
    {
        cout << s << " ";
    }
};

class Meter
{
    void displaybill(int n)
    {
        bill = n*5 + 50;
        cout << bill;
    }
};

class Bill: public Customer, Meter
{
    
    private: int n; string s;
    public:
    Bill(string s, int n)
    {
        this -> s = s;
        this -> n = n;
    }
    void display()
    {
        displayname(s);
        displaybill(n);
    }
};

int main()
{
    string s;
    int n;
    cin >> s;
    cin >> n;
    if(n>=0 && n<=1000)
    {
        Bill obj(s, n);
        obj.display();
    }
    else
    {
        cout << "Invalid input" << endl;
    }
    return 0;
}