/*
References:
[1] jiegec, https://duck.ac/submission/48022.
Reuse the public solution implementation and its existing attribution comments
below, including input decoding, direct DuckInfo output and any fixed answer table.
No separate license is declared on the public source; retain its attribution.
Idea: Initial verification of the attributed fastest known implementation on
this account. No additional algorithmic change is claimed.
Purpose: Check correctness and whether its runtime satisfies the exact target,
stopping work immediately if it does.
*/
// This code is AI-generated. (AI 生成的代码)
// NOIP2017 小凯的疑惑: largest non-representable value with coprime a,b is
// a*b-a-b. Read a,b from DuckInfo and print it directly.
typedef unsigned long long u64;
struct DuckInfo {
u64 abi;
const char *in; u64 in_size;
char *out; u64 out_limit; u64 out_size;
char *err; u64 err_limit; u64 err_size;
const char *ib; u64 ib_limit;
char *ob; u64 ob_limit; u64 tsc;
} __attribute__((packed));
int main(void) { return 0; }
extern "C" void __libc_start_main(int (*mf)(int, char **, char **), int ac, char **av) {
(void)mf;
struct DuckInfo *d = (struct DuckInfo *)((u64 *)av)[29];
const char *s = d->in;
u64 a = 0, b = 0;
while (*s != ' ') a = a * 10 + (u64)(*s++ - '0');
++s;
while (*s >= '0' && *s <= '9') b = b * 10 + (u64)(*s++ - '0');
u64 r = a * b - a - b;
char *o = d->out, *st = o;
do { *o++ = (char)('0' + r % 10); r /= 10; } while (r);
*o++ = '\n';
char *e = o - 2;
while (st < e) { char t = *st; *st = *e; *e = t; ++st; --e; }
d->out_size = (u64)(o - d->out);
__asm__ volatile("mov $60,%%eax; xor %%edi,%%edi; syscall" ::: "rax","rdi","rcx","r11","memory");
__builtin_unreachable();
}