T577383 【OI】A Critical Key

Background

![](https://cdn.luogu.com.cn/upload/image_hosting/tkrfoelc.png)

Description

This picture tells you how to use this critical key.

Input Format

A single line which contains an integer with no more than $10^5$ digits. Not all such integers are valid inputs.

Output Format

A single line which contains an integer.