a=int(input())
def ope(a):
    if a==1 or a==2 or a==3 or a==4:
        return True
    else:
        if a%2==0: 
            return ope(a/2)
        elif a%3==0:
            return ope(a/3)
        elif a%5==0:
            return ope(a/5)
        else:return False
i=1
while(a>0):
    if ope(i):
        
        a-=1
        i+=1
    else:
        i+=1
print(i-1)
bf88a3f5e113636a89b2df2609adb70b5e009b1e
<mask token>

<mask token>


def ope(a):
    if a == 1 or a == 2 or a == 3 or a == 4:
        return True
    elif a % 2 == 0:
        return ope(a / 2)
    elif a % 3 == 0:
        return ope(a / 3)
    elif a % 5 == 0:
        return ope(a / 5)
    else:
        return False


<mask token>

<mask token>


def ope(a):
    if a == 1 or a == 2 or a == 3 or a == 4:
        return True
    elif a % 2 == 0:
        return ope(a / 2)
    elif a % 3 == 0:
        return ope(a / 3)
    elif a % 5 == 0:
        return ope(a / 5)
    else:
        return False


<mask token>
while a > 0:
    if ope(i):
        a -= 1
        i += 1
    else:
        i += 1
print(i - 1)

a = int(input())


def ope(a):
    if a == 1 or a == 2 or a == 3 or a == 4:
        return True
    elif a % 2 == 0:
        return ope(a / 2)
    elif a % 3 == 0:
        return ope(a / 3)
    elif a % 5 == 0:
        return ope(a / 5)
    else:
        return False


i = 1
while a > 0:
    if ope(i):
        a -= 1
        i += 1
    else:
        i += 1
print(i - 1)

a=int(input())
def ope(a):
    if a==1 or a==2 or a==3 or a==4:
        return True
    else:
        if a%2==0: 
            return ope(a/2)
        elif a%3==0:
            return ope(a/3)
        elif a%5==0:
            return ope(a/5)
        else:return False
i=1
while(a>0):
    if ope(i):
        
        a-=1
        i+=1
    else:
        i+=1
print(i-1)