var fs = require('fs'); var length = fs.fstatSync(process.stdin.fd).size; var buffer = Buffer.alloc(length); var bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0); var input = buffer.toString('utf8', 0, bytesRead); var m=1000000007; var n=(input-0)%m; //var n=(r[1].length); var b=1; while(n--) { b=(b*10+3)%m; } console.log(b);