#include<stdio.h>
int main()
{
int n = 0;
scanf("%d", &n);
int total = 0;
int exh = 0;
int empty = n;
while (empty >= 2)
{
exh = exh+empty/ 2;
empty = empty / 2 + empty % 2;
}
total = exh + n;
printf("%d\n", total);
return 0;
}