using System;
public class Test
{
public static void Main()
{
int n = Int32.Parse(Console.ReadLine());
String s = "".PadLeft(n, 'X');
Console.WriteLine(s.Replace("X", s).Length);
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCWludCBuID0gSW50MzIuUGFyc2UoQ29uc29sZS5SZWFkTGluZSgpKTsKCQlTdHJpbmcgcyA9ICIiLlBhZExlZnQobiwgJ1gnKTsKCQlDb25zb2xlLldyaXRlTGluZShzLlJlcGxhY2UoIlgiLCBzKS5MZW5ndGgpOwoJfQp9