5329: Chewbacca and Number

内存限制:256 MB 时间限制:2 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:0 通过:0

题目描述

A. Chewbacca and Number
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Luke Skywalker gave Chewbacca an integer number x. Chewbacca isn't good at numbers but he loves inverting digits in them. Inverting digit t means replacing it with digit 9-t.
Help Chewbacca to transform the initial number x to the minimum possible positive number by inverting some (possibly, zero) digits. The decimal representation of the final number shouldn't start with a zero.
Input
The first line contains a single integer x (1≤x≤1018) − the number that Luke Skywalker gave to Chewbacca.
Output
Print the minimum possible positive number that Chewbacca can obtain after inverting some digits. The number shouldn't contain leading zeroes.
Examples
Input
27
Output
22
Input
4545
Output
4444

输入样例 复制


输出样例 复制