시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 15 6 4 36.364%

문제

At the latest KBTU ”Commencement” party Bakhytzhan noticed that there were n girls D1,D2,...,Dn and 2n−1 boys B1,B2,...,B2n−1. And every girl Dj knows exactly boys B1,B2,...,B2j−1. Throughout the evening party Bakhytzhan tried to count the number of possible choices of exactly r acquainted boys and girls pairs for dancing. That’s why he missed his chance for dancing. Please, write a program that would help Bakhytzhan don’t miss a chance to dance at the next party.

입력

The input file contains two integer numbers n and r (1 ≤ n,r ≤ 106) separated by a space.

출력

Output file should contain answer to Bakhytzhan’s problem – residue modulo 2946859

예제 입력

3 2

예제 출력

18

힌트