/* generated by esotope-bfc */
#include <stdio.h>
#include <stdint.h>
#define GETC() (fflush(stdout), fgetc(stdin))
#define PUTC(c) fputc(c, stdout)
static uint8_t m[30000], *p = m;
int main(void) {
        p[0] = GETC();
        while (p[0]) {
                p[0] = GETC();
                p[0] -= 10;
        }
        p[2] = -9;
        p[4] = -9;
        p[6] = -9;
        p[8] = -9;
        p[10] = -9;
        p[12] = -9;
        p[14] = GETC();
        p[14] -= 10;
        p[16] = 0;
        p[13] = 0;
        p[15] = 0;
        while (p[14]) {
                p[15] -= p[14];
                p[16] += p[14];
                p[14] = 0;
                while (p[15]) {
                        p[15] = 0;
                        p[13] = 1;
                        while (p[12]) {
                                ++p[12];
                                p += 2;
                        }
                        while (p[13]) {
                                p[12] -= 9;
                                p[11] = 1;
                                while (p[10]) {
                                        ++p[10];
                                        p += 4;
                                }
                                while (p[11]) {
                                        p[10] -= 9;
                                        p[9] = 1;
                                        while (p[8]) {
                                                ++p[8];
                                                p += 6;
                                        }
                                        while (p[9]) {
                                                p[8] -= 9;
                                                p[7] = 1;
                                                while (p[6]) {
                                                        ++p[6];
                                                        p += 8;
                                                }
                                                while (p[7]) {
                                                        p[6] -= 9;
                                                        p[5] = 1;
                                                        while (p[4]) {
                                                                ++p[4];
                                                                p += 10;
                                                        }
                                                        while (p[5]) {
                                                                ++p[3];
                                                                p[4] -= 9;
                                                                ++p[2];
                                                                p += 10;
                                                        }
                                                        p -= 2;
                                                }
                                                p -= 2;
                                        }
                                        p -= 2;
                                }
                                p -= 2;
                        }
                        p -= 2;
                }
                p[15] = p[16];
                p[16] = 0;
                p[14] = GETC();
                p[14] -= 10;
        }
        p[15] = 0;
        while (p[13] != 0) p -= 2;
        while (p[15]) {
                p[15] += 7;
                p[14] += 7*p[15]+1;
                p[15] = 0;
                PUTC(p[14]);
                p[14] = 0;
                p += 2;
        }
        return 0;
}

Measured memory_bytes: 128