int Calculate(int x)
{
int all = x;
int empty = x;
while (empty > 1)
{
all = all + empty / 2;
empty = empty / 2 + empty % 2;
}
return all;
}
int main()
{
int bottle = 0;
scanf("%d", &bottle);
int toltal = Calculate(bottle);
printf("%d", toltal);
return 0;
}