The detailed numerical simulations of the IV-characteristics of Josephson junction under external electromagnetic radiation show devil's staircases within different bias current intervals. We have found that the observed steps form very precisely continued fractions. Increasing of the amplitude of radiation shifts the devil's staircases to higher Shapiro steps. The algorithm of appearing and detection of the subharmonics with increasing radiation amplitude is proposed. We demonstrate that subharmonic steps registered in the famous experiments by A. H. Dayem and J. J. Wiegand [Phys. Rev 155, 419 (1967)] and J. Clarke [Phys. Rev. B 4, 2963(1971] also form continued fractions.Josephson junctions are regarded as excellent model systems for studying a variety of nonlinear phenomena in different fields of science [1, 2] such as frequency locking, chaos, charge density waves, transport in superconducting nanowires, interference phenomena and others [3][4][5][6]. These phenomena, and especially properties of the Shapiro steps (SS) [7] in Josephson junctions are very important for technical applications [8].In a Josephson system driven by an external microwave radiation, the so-called devil's staircase (DS) structure has been predicted as a consequence of the interplay of the Josephson plasma frequency, and the applied frequency (see Refs. [9,10] and references therein). To stress the universality in the scenario presented, we note that the devil's staircase appears in other systems including the infinite spin chains with long-range interactions [11], frustrated quasi-two-dimensional spin-dimer system in magnetic fields [12], systems of strongly interacting Rydberg atoms [13], and fractional quantum Hall effect [14]. A series of fractional synchronization regimes (devils staircase) in a spin-torque nano-oscillator driven by a microwave field was experimentally demonstrated [15]. The devil's staircase is considered as an outstanding example of a 'phase diagram' in physics, because it shows a high degree of self-organization [16].A detailed experimental investigation of the subharmonic SS in SNS junctions were made by J.Clarke [17]. He found that the application to a junction of rf electromagnetic radiation of frequency Ω induced constantvoltage current steps at voltages (n/m) Ω/(2e), where n and m are positive integers. The results were explained based on the idea that phase difference in Josephson junction is increasing in time in a uniform manner and current-phase relation is nonsinusoidal. The junction generates harmonics when it biased at some voltage and these harmonics may synchronize with the applied radiation to produce the steps. Another famous experiment on the behavior of thin-film superconducting bridges in a microwave field by A. H. Dayem and J. J. Wiegand [18] also demonstrates the production of constant-voltage steps in the IV-characteristics. Some experimental results are explained by nonsinusoidal current-phase relation [19,20]. Ben-Jacob with coauthors [10] found the subharmonic steps within the resistiv...