#!/usr/bin/env python3 # @author 轩辕龙儿 # @date 2022/10/25 # @file NP9.py num16 = input() num10 = int(num16, 16) print(num10)