#!/usr/bin/python3

import sys
from profile import Profile

profile = Profile()

for line in sys.stdin:
    emad = profile.emad_from_relfi(line.strip())
    print(emad)