document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include<iostream>
  2. using namespace std;
  3. #define MAX 32767
  4.  
  5. int main()
  6. {
  7. long long int exp[MAX]={0};
  8. exp[0]=0;
  9. exp[1]=1;
  10. exp[2]=1;
  11. exp[3]=2;
  12.  
  13. long long int input;
  14. cin>>input;
  15.  
  16. for(long long int day=4 ;day<=input;day++)
  17. {
  18. exp[day]=exp[day-1]+exp[day-2];
  19. if((day-1)%3==0)
  20. {
  21. exp[day]--;
  22. }
  23. }
  24.  
  25. cout<<(exp[input]%100019)<<endl;
  26.  
  27. return 0;
  28. }
');