import java.util.Scanner; public class Main { public static int solven(int n) { int addNum = 1, ans = 1, day = n - 1; while(day > addNum) { ans += addNum - 1; day -= ++addNum; } return ans + day; } public static void main(String[] args) { Scanner cin = new Scanner(System.in); while(cin.hasNext()) { int n = cin.nextInt(); System.out.println(solven(n)); } } }