{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string \"13\" and can be divided by 13. For example, 130 and 2613 are wqb-numbers, but 143 and 2639 are not. Your task is to calculate how many wqb-numbers from 1 to n for a given integer n. \n\u003cbr/\u003e\n求在[1,n]中有多少个数满足能被13整除并且包含子串\"13\"(如2613满足条件,而143不满足条件)。 \n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Process till EOF. In each line, there is one positive integer n(1 \u0026lt;\u003d n \u0026lt;\u003d 1000000000).\n\u003cbr/\u003e\n一个正整数n(1 ≤ n ≤ 1e9),一直输入到EOF为止"}},{"title":"Output","value":{"format":"HTML","content":"Print each answer in a single line.\n\u003cbr/\u003e\n输出一行表示满足条件的答案"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e13\n100\n200\n1000\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e1\n1\n2\n2\u003c/pre\u003e"}}]}