As = 'abcdefghijklmnopqrstuvwxyz' def solve(N, As): if N == 0: return '' if N == 1: return As[0] m = int(N**0.5) + 1 while m * (m+1) > N: m -= 1 n = N - m * (m + 1) return As[0:2] * m + solve(n, As[2:]) N = int(input()) print(len(solve(N, As)))