# -*- coding: utf-8 -*-
"""
Created on Tue Jan 26 13:54:07 2021

@author: antons.sincovs
"""

current_max = 0
num_of_max = 1
previous_max = 0

while True:
    number = int(input("Enter an int: "))
    if number > current_max:
        num_of_max = 1
        previous_max , current_max = current_max , number
    elif number == current_max:
       previous_max , current_max = current_max , number
       num_of_max += 1
    elif number == 0:
        break
print(num_of_max)

4d8cb452a7c7cb92b8bfc679c4ca09279f3bd254
<mask token>

<mask token>
while True:
    number = int(input('Enter an int: '))
    if number > current_max:
        num_of_max = 1
        previous_max, current_max = current_max, number
    elif number == current_max:
        previous_max, current_max = current_max, number
        num_of_max += 1
    elif number == 0:
        break
print(num_of_max)

<mask token>
current_max = 0
num_of_max = 1
previous_max = 0
while True:
    number = int(input('Enter an int: '))
    if number > current_max:
        num_of_max = 1
        previous_max, current_max = current_max, number
    elif number == current_max:
        previous_max, current_max = current_max, number
        num_of_max += 1
    elif number == 0:
        break
print(num_of_max)

# -*- coding: utf-8 -*-
"""
Created on Tue Jan 26 13:54:07 2021

@author: antons.sincovs
"""

current_max = 0
num_of_max = 1
previous_max = 0

while True:
    number = int(input("Enter an int: "))
    if number > current_max:
        num_of_max = 1
        previous_max , current_max = current_max , number
    elif number == current_max:
       previous_max , current_max = current_max , number
       num_of_max += 1
    elif number == 0:
        break
print(num_of_max)
