The dynamical evolution of 2×105 hypothetical Oort cloud comets by the action of planetary, galactic and stellar perturbations during 2×109 years is studied numerically. The evolution of comet orbits from the outer (104 AU < a < 5×104 AU, ? - semi-major axes) and the inner Oort cloud (5×103 AU < a < 104 AU) to near-Earth space is investigated separately. The distribution of the perihelion (q) passage frequency in the planetary region is received calculating the numbers of comets in every interval of ∆q per year. The flux of long-period (LP) comets (orbital periods P > 200 yr) with perihelion distances q < 1.5 AU brighter than visual absolute magnitude H = 7 is ~ 1.8 comets per year, and ~ 22 comets with H < 10.9. The ratio of all LP comets with q < 1.5 AU to new comets is ~ 5. The probability of passing of LP comet from the inner Oort cloud through region q < 1.5 AU is ~ 3.5×10-13 yr-1, that is on the order of values less than probability of passing of LP comet from the outer cloud (~ 5.28×10-12 yr-1). We show that the flux of new comets with 15 AU < q < 31 AU is higher than with q < 15 AU, by a factor ~ 1.7 for comets from the outer Oort cloud and, by a factor ~ 7 for comets from the inner cloud. The perihelia of comets from the outer cloud previously passed through the planetary region are predominated in the Saturn-Uranus region. The majority of inner cloud comets come in the outer Solar system (q > 15 AU), a small fraction of ~ 0.01 them can reach orbits with q < 1.5 AU. The probability of transfer of comet from the inner cloud to the outer Oort cloud from where it is injected to the region q < 1.5 AU is ~ 6×10-14 yr-1. This work was supported by RFBR-Ural Grant 04-02-96042 and RFBR Grant 06-02-16512.