// Arup Guha
// 11/11/2017
// Solution to 2017 SER D2 Problem: Halfway

import java.util.*;

public class halfway {

	public static long n;

	public static void main(String[] args) {

		// Just get the input.
		Scanner stdin = new Scanner(System.in);
		n = stdin.nextLong();

		// Here is how far we need to get.
		long whole = n*(n-1)/2;
		long target = whole%2 == 0 ? whole/2 : whole/2+1;

		// Being lazy and using a binary search instead of solving a quadratic.
		long low = 1, high = n;
		while (low < high) {

			// Number of terms we're trying.
			long mid = (low+high)/2;

			// Sum for this number of terms.
			long sum = getSum(mid);

			// Adjust low or hiigh accordingly.
			if (sum < target)
				low = mid+1;
			else
				high = mid;
		}

		// "Walk the last step, if necessary."
		while (getSum(low) < target) low++;
		System.out.println(low);
	}

	// Sum of first k rows.
	public static long getSum(long k) {
		return ((2*n-k-1)*k)/2;
	}
}