Octal

Time limit1sMemory limit128 MB

Problem

A positive integer is written in binary. Convert it to octal by using the following method.

  1. Add 0 characters to the front until the length of the binary string is a multiple of 3.
  2. Split the string into groups of three digits from left to right.
  3. Replace each three-digit binary group with one octal digit according to the table below.

Given the binary number, print its octal representation.

BinaryOctal
0000
0011
0102
0113
1004
1015
1106
1117

Input

The first line contains a binary number. Its length is between 1 and 100, inclusive, and its first character is 1.

Output

Print the converted octal number on one line.