// ... (126)
  long long g(x,r){return r--<0?0:g(x,r)-g(x/=r=r*8/7*3/2*2+5)*r+(x+1LL)*x*r/2;}main(t){printf("%jd\n%jd",g(t=1e5),g(t=1e9,9));}
//----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----+----3
#if 0
disassembled code:
8048510 <g>:
 8048510:       55                      push   %ebp
 8048511:       57                      push   %edi
 8048512:       31 c0                   xor    %eax,%eax
 8048514:       56                      push   %esi
 8048515:       53                      push   %ebx
 8048516:       31 d2                   xor    %edx,%edx
 8048518:       83 ec 2c                sub    $0x2c,%esp
 804851b:       8b 4c 24 44             mov    0x44(%esp),%ecx
 804851f:       85 c9                   test   %ecx,%ecx
 8048521:       0f 88 f1 00 00 00       js     8048618 <g+0x108>
 8048527:       8d 59 ff                lea    -0x1(%ecx),%ebx
 804852a:       83 ec 08                sub    $0x8,%esp
 804852d:       53                      push   %ebx
 804852e:       ff 74 24 4c             pushl  0x4c(%esp)
 8048532:       e8 d9 ff ff ff          call   8048510 <g>
 8048537:       8d 0c dd 00 00 00 00    lea    0x0(,%ebx,8),%ecx
 804853e:       89 c7                   mov    %eax,%edi
 8048540:       89 d5                   mov    %edx,%ebp
 8048542:       ba 93 24 49 92          mov    $0x92492493,%edx
 8048547:       89 c8                   mov    %ecx,%eax
 8048549:       f7 ea                   imul   %edx
 804854b:       01 ca                   add    %ecx,%edx
 804854d:       c1 f9 1f                sar    $0x1f,%ecx
 8048550:       c1 fa 02                sar    $0x2,%edx
 8048553:       29 ca                   sub    %ecx,%edx
 8048555:       8d 04 52                lea    (%edx,%edx,2),%eax
 8048558:       89 c3                   mov    %eax,%ebx
 804855a:       c1 eb 1f                shr    $0x1f,%ebx
 804855d:       01 d8                   add    %ebx,%eax
 804855f:       83 e0 fe                and    $0xfffffffe,%eax
 8048562:       8d 58 05                lea    0x5(%eax),%ebx
 8048565:       8b 44 24 50             mov    0x50(%esp),%eax
 8048569:       99                      cltd   
 804856a:       f7 fb                   idiv   %ebx
 804856c:       89 04 24                mov    %eax,(%esp)
 804856f:       89 c6                   mov    %eax,%esi
 8048571:       e8 9a ff ff ff          call   8048510 <g>
 8048576:       89 d9                   mov    %ebx,%ecx
 8048578:       83 c4 10                add    $0x10,%esp
 804857b:       89 54 24 18             mov    %edx,0x18(%esp)
 804857f:       c1 f9 1f                sar    $0x1f,%ecx
 8048582:       8b 54 24 18             mov    0x18(%esp),%edx
 8048586:       89 74 24 10             mov    %esi,0x10(%esp)
 804858a:       89 4c 24 0c             mov    %ecx,0xc(%esp)
 804858e:       89 f1                   mov    %esi,%ecx
 8048590:       89 5c 24 08             mov    %ebx,0x8(%esp)
 8048594:       c1 f9 1f                sar    $0x1f,%ecx
 8048597:       89 4c 24 14             mov    %ecx,0x14(%esp)
 804859b:       8b 4c 24 0c             mov    0xc(%esp),%ecx
 804859f:       0f af d3                imul   %ebx,%edx
 80485a2:       0f af c8                imul   %eax,%ecx
 80485a5:       01 d1                   add    %edx,%ecx
 80485a7:       f7 e3                   mul    %ebx
 80485a9:       01 ca                   add    %ecx,%edx
 80485ab:       29 c7                   sub    %eax,%edi
 80485ad:       8b 4c 24 14             mov    0x14(%esp),%ecx
 80485b1:       19 d5                   sbb    %edx,%ebp
 80485b3:       8b 54 24 10             mov    0x10(%esp),%edx
 80485b7:       8b 44 24 14             mov    0x14(%esp),%eax
 80485bb:       89 7c 24 18             mov    %edi,0x18(%esp)
 80485bf:       89 6c 24 1c             mov    %ebp,0x1c(%esp)
 80485c3:       83 c2 01                add    $0x1,%edx
 80485c6:       83 d1 00                adc    $0x0,%ecx
 80485c9:       89 54 24 10             mov    %edx,0x10(%esp)
 80485cd:       89 4c 24 14             mov    %ecx,0x14(%esp)
 80485d1:       0f af ce                imul   %esi,%ecx
 80485d4:       0f af c2                imul   %edx,%eax
 80485d7:       89 cf                   mov    %ecx,%edi
 80485d9:       01 c7                   add    %eax,%edi
 80485db:       8b 44 24 10             mov    0x10(%esp),%eax
 80485df:       f7 e6                   mul    %esi
 80485e1:       8b 74 24 0c             mov    0xc(%esp),%esi
 80485e5:       01 fa                   add    %edi,%edx
 80485e7:       89 c7                   mov    %eax,%edi
 80485e9:       0f af f0                imul   %eax,%esi
 80485ec:       89 d0                   mov    %edx,%eax
 80485ee:       0f af c3                imul   %ebx,%eax
 80485f1:       01 c6                   add    %eax,%esi
 80485f3:       89 f8                   mov    %edi,%eax
 80485f5:       31 ff                   xor    %edi,%edi
 80485f7:       f7 e3                   mul    %ebx
 80485f9:       89 d1                   mov    %edx,%ecx
 80485fb:       01 f1                   add    %esi,%ecx
 80485fd:       89 ce                   mov    %ecx,%esi
 80485ff:       c1 ee 1f                shr    $0x1f,%esi
 8048602:       01 c6                   add    %eax,%esi
 8048604:       11 cf                   adc    %ecx,%edi
 8048606:       89 f0                   mov    %esi,%eax
 8048608:       89 fa                   mov    %edi,%edx
 804860a:       0f ac d0 01             shrd   $0x1,%edx,%eax
 804860e:       d1 fa                   sar    %edx
 8048610:       03 44 24 18             add    0x18(%esp),%eax
 8048614:       13 54 24 1c             adc    0x1c(%esp),%edx
 8048618:       83 c4 2c                add    $0x2c,%esp
 804861b:       5b                      pop    %ebx
 804861c:       5e                      pop    %esi
 804861d:       5f                      pop    %edi
 804861e:       5d                      pop    %ebp
 804861f:       c3                      ret    
8048620 <main>:
 8048620:       83 ec 24                sub    $0x24,%esp
 8048623:       6a 09                   push   $0x9
 8048625:       68 00 ca 9a 3b          push   $0x3b9aca00
 804862a:       e8 e1 fe ff ff          call   8048510 <g>
 804862f:       c7 04 24 a0 86 01 00    movl   $0x186a0,(%esp)
 8048636:       89 44 24 18             mov    %eax,0x18(%esp)
 804863a:       89 54 24 1c             mov    %edx,0x1c(%esp)
 804863e:       e8 cd fe ff ff          call   8048510 <g>
 8048643:       59                      pop    %ecx
 8048644:       ff 74 24 18             pushl  0x18(%esp)
 8048648:       ff 74 24 18             pushl  0x18(%esp)
 804864c:       52                      push   %edx
 804864d:       50                      push   %eax
 804864e:       68 30 87 04 08          push   $0x8048730
 8048653:       e8 48 fd ff ff          call   80483a0 <printf@plt>
 8048658:       83 c4 3c                add    $0x3c,%esp
 804865b:       c3                      ret    
#endif