#include <stdio.h>
#include <string.h>
int i;
char s[2000], c, p[2000];
const char r = '\r', n = '\n', t = '\t', b = '\\', q = '\"',
l0[] = "#include <stdio.h>",
l1[] = "#include <string.h>",
l2[] = "int i;",
l3[] = "char s[2000], c, p[2000];",
l[] = "%s%c%c%s%c%c%c%c%s%c%c%s%c%cconst char r = '%cr', n = '%cn', t = '%ct', b = '%c%c', q = '%c%c',%c%cl0[] = %c%s%c,%c%cl1[] = %c%s%c,%c%cl2[] = %c%s%c,%c%cl3[] = %c%s%c,%c%cl[] = %c%s%c,%c%cl4[] = %c%s%c,%c%cl5[] = %c%s%c,%c%cl6[] = %c%s%c,%c%cl7[] = %c%s%c,%c%cl8[] = %c%s%c,%c%cl9[] = %c%s%c;%c%c%c%c%s%c%c{%c%c%c%s%c%c%c%s%c%c%c%c%s%c%c%c%s%c%c%c%c%c%s%c%c}%c%c",
l4[] = "int main(void)",
l5[] = "sprintf(p, l, l0, r, n, l1, r, n, r, n, l2, r, n, l3, r, n, b, b, b, b, b, b, q, r, n, q, l0, q, r, n, q, l1, q, r, n, q, l2, q, r, n, q, l3, q, r, n, q, l, q, r, n, q, l4, q, r, n, q, l5, q, r, n, q, l6, q, r, n, q, l7, q, r, n, q, l8, q, r, n, q, l9, q, r, n, r, n, l4, r, n, r, n, t, l5, r, n, t, l6, r, n, t, t, l7, r, n, t, l8, r, n, r, n, t, l9, r, n, r, n);",
l6[] = "while ((c = getchar()) != EOF)",
l7[] = "s[i++] = c;",
l8[] = "putchar(48 + !strcmp(s, p));",
l9[] = "return 0;";
int main(void)
{
sprintf(p, l, l0, r, n, l1, r, n, r, n, l2, r, n, l3, r, n, b, b, b, b, b, b, q, r, n, q, l0, q, r, n, q, l1, q, r, n, q, l2, q, r, n, q, l3, q, r, n, q, l, q, r, n, q, l4, q, r, n, q, l5, q, r, n, q, l6, q, r, n, q, l7, q, r, n, q, l8, q, r, n, q, l9, q, r, n, r, n, l4, r, n, r, n, t, l5, r, n, t, l6, r, n, t, t, l7, r, n, t, l8, r, n, r, n, t, l9, r, n, r, n);
while ((c = getchar()) != EOF)
s[i++] = c;
putchar(48 + !strcmp(s, p));
return 0;
}